/* CSZone Central Hub — Premium Cybersecurity Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b090f;
  --bg-secondary: #120e17;
  --bg-card: rgba(22, 18, 28, 0.75);
  --bg-card-hover: rgba(30, 24, 38, 0.9);
  --border: #262030;
  --border-highlight: #3d334d;
  
  --text: #f3f0f7;
  --text-muted: #9a91a3;
  --text-dim: #6e6478;

  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.15);
  --crimson: #ef4444;
  --crimson-glow: rgba(239, 68, 68, 0.15);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.15);
  --purple: #a855f7;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(239, 68, 68, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(168, 85, 247, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ── */
.navbar {
  background: rgba(14, 11, 19, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.nav-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #0b090f;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 8px 12px;
  border-radius: 8px;
  letter-spacing: -0.5px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.brand-text h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-text h1 span {
  color: var(--amber);
}

.subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stats-bar {
  display: flex;
  gap: 12px;
}

.stat-item {
  background: rgba(26, 21, 33, 0.8);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.stat-value.status-online {
  color: var(--emerald);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Hero Section ── */
.hero {
  padding: 48px 0 28px 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.pill-badge {
  display: inline-block;
  background: var(--amber-glow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff, #c7c0cf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ── Controls (Search & Filter) ── */
.controls-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.search-box {
  width: 100%;
  max-width: 560px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  background: #14101a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 18px 13px 44px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
  background: #181320;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill {
  background: #15111c;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.pill:hover {
  color: var(--text);
  border-color: var(--border-highlight);
  background: #1d1826;
}

.pill.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  color: var(--amber);
  font-weight: 600;
}

/* ── Grid Header ── */
.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.grid-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.scenario-counter {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Scenarios Grid ── */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 50px;
}

.scenario-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.scenario-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.scenario-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), transparent);
  opacity: 0;
  transition: var(--transition);
}

.scenario-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.port-tag {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.difficulty-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.diff-easy {
  background: var(--emerald-glow);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.diff-medium {
  background: var(--amber-glow);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.diff-hard {
  background: var(--crimson-glow);
  color: var(--crimson);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  line-height: 1.4;
}

.card-cat {
  font-size: 0.78rem;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.card-action {
  margin-top: auto;
}

.launch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b090f;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.launch-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.launch-btn svg {
  transition: var(--transition);
}

.launch-btn:hover svg {
  transform: translateX(3px);
}

/* ── Guidelines Section ── */
.rules-section {
  padding: 40px 0 60px 0;
  border-top: 1px solid var(--border);
  background: rgba(14, 11, 19, 0.4);
}

.rules-card {
  background: #14101c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.rules-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.rules-icon {
  font-size: 1.8rem;
}

.rules-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.rules-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.rule-item {
  display: flex;
  gap: 14px;
  background: rgba(22, 17, 28, 0.6);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--radius-sm);
}

.rule-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--amber);
}

.rule-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #fff;
}

.rule-item p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.rule-item code {
  font-family: var(--font-mono);
  background: #0b090f;
  color: var(--amber);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Footer ── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: #0b090f;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.footer-links code {
  color: var(--amber);
}

@media (max-width: 768px) {
  .nav-container, .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .stats-bar {
    width: 100%;
    justify-content: center;
  }
}

/* ── Professional Coming Soon Modal ── */
.cs-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 6, 12, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cs-modal-card {
  background: #14101c;
  border: 1px solid #382e4a;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.1);
  border-radius: 12px;
  max-width: 540px;
  width: 100%;
  padding: 30px;
  position: relative;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.cs-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cs-modal-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.cs-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.cs-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.cs-modal-title {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.cs-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.cs-modal-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.cs-modal-progress-wrap {
  background: #0d0a13;
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.cs-modal-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.cs-modal-progress-bar {
  height: 6px;
  background: #1e1927;
  border-radius: 4px;
  overflow: hidden;
}

.cs-modal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #e0314f);
  border-radius: 4px;
}

.cs-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.cs-modal-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b090f;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.cs-modal-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
