@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Oswald:wght@300;400;600;700&family=VT323&display=swap');

:root {
  --yellow: #FFD700;
  --yellow-dim: #B8960A;
  --yellow-dark: #6B5500;
  --bg: #080808;
  --bg2: #0D0D0D;
  --bg3: #111111;
  --red: #FF2222;
  --gray: #aaa;
  --gray-dim: #555;
  --green: #00FF66;
  --white: #E8E8E8;
}

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Share Tech Mono', monospace;
  font-size: 16px;
  overflow-x: hidden;
  cursor: crosshair;
  min-height: 100vh;
}

/* SCANLINES */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.12) 2px, rgba(0,0,0,0.12) 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: scanlines 0.1s linear infinite;
}

/* VIGNETTE */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 9998;
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.fog-layer {
  position: fixed;
  top: 0; left: 0;
  width: 200%; height: 100%;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(255,200,0,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(255,255,255,0.02) 0%, transparent 50%);
  animation: fogDrift 30s linear infinite;
}

@keyframes fogDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.site-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

/* ═══ TOPBAR ═══ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 54px;
  background: rgba(5,5,5,0.95);
  border-bottom: 1px solid rgba(255,215,0,0.15);
  backdrop-filter: blur(4px);
}

.topbar-logo {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--yellow);
  letter-spacing: 3px;
  text-decoration: none;
  animation: flickerFast 8s step-end infinite;
  cursor: pointer;
}

@keyframes flickerFast {
  0%,97%,99%,100% { opacity: 1; }
  98% { opacity: 0.3; }
}

.topbar-nav {
 position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 2rem;
  list-style: none;
}

.topbar-nav a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255,215,0,0.5);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-bar {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,215,0,0.2);
  color: var(--white);
  padding: 5px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 1px;
  width: 190px;
  outline: none;
  transition: border-color 0.3s;
}

.search-bar:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 8px rgba(255,215,0,0.2);
}

.search-bar::placeholder { color: var(--gray-dim); }

.sound-toggle {
  background: none;
  border: 1px solid rgba(255,215,0,0.3);
  color: var(--yellow);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 2px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.sound-toggle:hover {
  background: rgba(255,215,0,0.1);
  box-shadow: 0 0 6px rgba(255,215,0,0.3);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.2s step-end infinite;
  display: inline-block;
}

.status-dot.online { background: var(--green); }

@keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0 } }

/* ═══ PROGRESS BAR ═══ */
.progress-bar {
  position: fixed;
  top: 54px;
  left: 0;
  height: 2px;
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255,215,0,0.6);
  z-index: 1001;
  transition: width 0.1s;
  width: 0%;
}

/* ═══ SYS ALERT ═══ */
.sys-alert {
  position: fixed;
  top: 72px;
  right: 1rem;
  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255,50,50,0.4);
  padding: 0.85rem 1.1rem;
  max-width: 300px;
  z-index: 2000;
  font-size: 0.75rem;
  letter-spacing: 1px;
  line-height: 1.6;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.sys-alert.show { transform: translateX(0); }

.sys-alert-title {
  color: var(--red);
  font-size: 0.7rem;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.sys-alert-msg { color: var(--gray); }

/* ═══ WARNING POPUP ═══ */
.warning-popup {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  background: rgba(0,0,0,0.95);
  border: 1px solid rgba(255,215,0,0.3);
  padding: 0.85rem 1.1rem;
  z-index: 3000;
  max-width: 270px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s;
  pointer-events: none;
}

.warning-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.warning-popup-title {
  color: var(--yellow);
  font-size: 0.65rem;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.warning-popup-body { color: var(--gray); line-height: 1.6; }

/* ═══ HERO ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 54px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,215,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,215,0,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%,100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% 40%, rgba(255,200,50,0.04) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20,15,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

@keyframes fluorFlicker {
  0%,91%,93%,100% { opacity: 0.8; }
  92% { opacity: 0.1; }
  94%,96% { opacity: 0.6; }
  95% { opacity: 0; }
}

.hero-title-wrap {
  position: relative;
  text-align: center;
  z-index: 10;
}

.classified-stamp {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 8px;
  color: var(--red);
  border: 2px solid var(--red);
  display: inline-block;
  padding: 10px 14px;
  margin-bottom: 2rem;
  opacity: 0.8;
  transform: rotate(-2deg);
  animation: classifiedPulse 3s ease-in-out infinite;
}

@keyframes classifiedPulse {
  0%,100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255,215,0,0.3), 0 0 60px rgba(255,215,0,0.1);
  animation: titleGlitch 10s step-end infinite;
}

@keyframes titleGlitch {
  0%,94%,100% { transform: none; text-shadow: 0 0 20px rgba(255,215,0,0.3); }
  95% { transform: skewX(-3deg) translateX(-4px); text-shadow: -3px 0 rgba(255,0,0,0.5), 3px 0 rgba(0,200,255,0.5); color: #FFF; }
  96% { transform: skewX(2deg) translateX(3px); }
  97% { transform: none; }
  98% { transform: skewX(-1deg); }
}

.hero-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  color: var(--gray);
  letter-spacing: 4px;
  margin-top: 2rem;
  animation: subtitleBlink 7s step-end infinite;
}

@keyframes subtitleBlink {
  0%,88%,90%,100% { opacity: 1; }
  89% { opacity: 0; }
}

.hero-tagline {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: rgba(255,215,0,0.4);
  margin-top: 1.5rem;
  text-transform: uppercase;
}

@keyframes warnSlide {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,215,0,0.3);
  font-size: 0.75rem;
  letter-spacing: 3px;
  animation: scrollBob 2s ease-in-out infinite;
}

.scroll-cue::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,215,0,0.4), transparent);
}

@keyframes scrollBob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══ SECTIONS ═══ */
section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-header::before {
  content: '';
  display: block;
  width: 3px;
  height: 28px;
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255,215,0,0.5);
  flex-shrink: 0;
}

.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--yellow);
  text-transform: uppercase;
}

.section-subtitle {
  font-size: 0.72rem;
  color: var(--gray-dim);
  letter-spacing: 2px;
  margin-left: auto;
}

/* ═══ NAV CARDS GRID ═══ */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.1);
  position: relative;
}

.nav-grid::before {
  content: '██ ЗАСЕКРЕЧЕННЫЕ РАЗДЕЛЫ — ДОСТУП ТОЛЬКО ДЛЯ АВТОРИЗОВАННЫХ ██';
  position: absolute;
  top: -28px;
  left: 0;
  font-size: 0.62rem;
  letter-spacing: 2px;
  color: rgba(255,50,50,0.5);
}

.nav-card {
  background: var(--bg2);
  padding: 2.5rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}

.nav-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-accent, rgba(255,215,0,0.05));
  opacity: 0;
  transition: opacity 0.4s;
}

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

.nav-card:hover {
  background: rgba(20,15,0,1);
  border-color: rgba(255,215,0,0.2);
}

.nav-card:hover .card-title {
  animation: cardTitleGlitch 0.3s step-end forwards;
}

@keyframes cardTitleGlitch {
  0%,100% { transform: none; }
  25% { transform: skewX(-4deg) translateX(-2px); }
  50% { transform: skewX(2deg) translateX(2px); }
  75% { transform: none; }
}

.card-num {
  font-size: 0.65rem;
  color: var(--gray-dim);
  letter-spacing: 3px;
  margin-bottom: 0.8rem;
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  display: block;
  filter: grayscale(0.5);
  transition: filter 0.3s;
}

.nav-card:hover .card-icon { filter: none; }

.card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}

.nav-card:hover .card-title { color: var(--yellow); }

.card-desc {
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 1px;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.card-tag {
  font-size: 0.6rem;
  letter-spacing: 2px;
  padding: 2px 7px;
  border: 1px solid;
}

.tag-yellow { border-color: rgba(255,215,0,0.4); color: rgba(255,215,0,0.7); }
.tag-red { border-color: rgba(255,50,50,0.4); color: rgba(255,50,50,0.7); }
.tag-green { border-color: rgba(0,255,100,0.3); color: rgba(0,255,100,0.6); }
.tag-gray { border-color: rgba(150,150,150,0.3); color: rgba(150,150,150,0.6); }

.card-arrow {
  color: var(--yellow);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s;
}

.nav-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-danger-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--yellow);
  width: 0;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(255,215,0,0.5);
}

.nav-card:hover .card-danger-line { width: 100%; }

/* ═══ TERMINAL PANEL ═══ */
.terminal-panel {
  background: #050505;
  border: 1px solid rgba(0,255,100,0.15);
  padding: 1.5rem;
  font-family: 'Share Tech Mono', monospace;
  position: relative;
}

.terminal-panel::before {
  content: '> TERMINAL ACCESS — COTF DATABASE v2.3.1';
  display: block;
  color: rgba(0,255,100,0.4);
  font-size: 0.72rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0,255,100,0.08);
  padding-bottom: 0.5rem;
}

.terminal-line {
  font-size: 0.78rem;
  color: rgba(0,255,100,0.6);
  letter-spacing: 1px;
  line-height: 2;
  display: flex;
  gap: 1rem;
}

.terminal-line .prompt { color: rgba(0,255,100,0.3); flex-shrink: 0; }
.terminal-line .cmd { color: var(--green); }
.terminal-line .output { color: rgba(0,255,100,0.5); }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

/* ═══ PAGE HEADER (for inner pages) ═══ */
.page-header {
  padding-top: 54px;
  background: var(--bg2);
  border-bottom: 1px solid rgba(255,215,0,0.1);
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,215,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,215,0,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
  position: relative;
  z-index: 1;
}

.page-header-tag {
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: rgba(255,215,0,0.4);
  margin-bottom: 0.75rem;
}

.page-header-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(255,215,0,0.2);
  margin-bottom: 0.5rem;
}

.page-header-sub {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--gray-dim);
  letter-spacing: 3px;
}

/* ═══ CARDS (inner pages) ═══ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}

.entry-card {
  background: var(--bg2);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
  cursor: default;
}

.entry-card:hover { background: var(--bg3); }

.entry-card-id {
  font-size: 0.65rem;
  color: rgba(255,215,0,0.45);
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.entry-card-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}

.entry-card:hover .entry-card-name { color: var(--yellow); }

.entry-card-desc {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.8;
  letter-spacing: 0.5px;
}

.entry-card-footer {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.entry-card-bottom-line {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--yellow);
  transition: width 0.4s ease;
  box-shadow: 0 0 6px rgba(255,215,0,0.4);
}

.entry-card:hover .entry-card-bottom-line { width: 100%; }

/* Danger bar */
.danger-bar {
  height: 4px;
  background: rgba(255,255,255,0.05);
  margin-top: 6px;
  position: relative;
  width: 100%;
}

.danger-fill {
  height: 100%;
  background: var(--red);
  box-shadow: 0 0 6px rgba(255,0,0,0.5);
}

/* ═══ DATA ROWS ═══ */
.data-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8rem;
}

.data-label {
  color: var(--yellow);
  font-size: 0.7rem;
  letter-spacing: 2px;
  width: 160px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.data-value {
  color: var(--gray);
  font-size: 0.78rem;
  letter-spacing: 1px;
}

/* ═══ STATS PANEL ═══ */
.stats-panel {
  background: rgba(255,215,0,0.02);
  border: 1px solid rgba(255,215,0,0.08);
  padding: 2rem;
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item { text-align: center; }

.stat-num {
  font-family: 'VT323', monospace;
  font-size: 2.8rem;
  color: var(--yellow);
  line-height: 1;
  text-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.stat-label {
  font-size: 0.65rem;
  color: var(--gray-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ═══ HAZARD BADGE ═══ */
.hazard-badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 2px;
  padding: 2px 8px;
  border: 1px solid;
}

.hazard-0 { border-color: rgba(0,255,100,0.4); color: rgba(0,255,100,0.7); }
.hazard-1 { border-color: rgba(100,255,50,0.4); color: rgba(100,255,50,0.7); }
.hazard-2 { border-color: rgba(255,215,0,0.4); color: rgba(255,215,0,0.7); }
.hazard-3 { border-color: rgba(255,140,0,0.5); color: rgba(255,140,0,0.8); }
.hazard-4 { border-color: rgba(255,60,0,0.5); color: rgba(255,60,0,0.8); }
.hazard-5 { border-color: rgba(255,0,0,0.6); color: rgba(255,0,0,0.9); }
.hazard-omega { border-color: rgba(200,0,255,0.6); color: rgba(200,0,255,0.9); }

/* ═══ FILTER BAR ═══ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: none;
  border: 1px solid rgba(255,215,0,0.2);
  color: var(--gray-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255,215,0,0.05);
}

/* ═══ FOOTER ═══ */
.site-footer {
  border-top: 1px solid rgba(255,215,0,0.08);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--gray-dim);
  letter-spacing: 2px;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-warning {
  color: rgba(255,50,50,0.4);
  font-size: 0.62rem;
  letter-spacing: 1px;
  line-height: 1.8;
  max-width: 500px;
}

/* ═══ SECRET MSG ═══ */
.secret-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.98);
  border: 2px solid var(--red);
  padding: 2rem 3rem;
  z-index: 9000;
  text-align: center;
  display: none;
  font-family: 'VT323', monospace;
}

.secret-msg.show { display: block; }

.secret-title { font-size: 2.2rem; color: var(--red); letter-spacing: 4px; margin-bottom: 1rem; }
.secret-text { font-size: 1.3rem; color: var(--gray); line-height: 1.6; letter-spacing: 2px; }

/* ═══ UNIFIED CARD STYLES ═══ */
.level-card,
.entity-card,
.object-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.level-card:hover,
.entity-card:hover,
.object-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* Content wrapper for unified alignment */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-middle {
  flex-shrink: 0;
  margin-top: auto;
  padding-bottom: 1.5rem;
}

.card-bottom {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0.75rem;
}

/* Force footer to bottom */
.level-card-footer,
.entity-footer,
.object-footer {
  margin-top: auto !important;
  padding-top: 0.75rem;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .nav-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-nav { display: none; }
  .hero-title { font-size: 2.5rem; }
}

@media (max-width: 600px) {
  .nav-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  section { padding: 2rem 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
