/* ═══════════════════════════════════════════════════════════════
   ARK OF LIFE – Stylesheet
   Aesthetic: Dark Sci-Fi / Space Opera / Retro-Futurism
   Fonts: Orbitron (display) + Exo 2 (body)
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Exo+2:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg-deep:      #04060e;
  --bg-card:      #080c18;
  --bg-nav:       rgba(4, 6, 14, 0.92);
  --cyan:         #00e5ff;
  --cyan-dim:     #00e5ff44;
  --amber:        #ff9500;
  --amber-dim:    #ff950033;
  --red-alert:    #ff3c5a;
  --text-primary: #d4e8f0;
  --text-muted:   #6a8a9a;
  --border:       #0e2030;
  --border-glow:  #00e5ff22;
  --font-display: 'Orbitron', monospace;
  --font-body:    'Exo 2', sans-serif;
  --nav-h:        70px;
  --radius:       4px;
  --transition:   0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Star Background ────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, #ffffff33 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, #ffffff22 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, #ffffff44 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, #ffffff22 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 25%, #ffffff33 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 75%, #ffffff1a 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, #ffffff22 0%, transparent 100%),
    radial-gradient(2px 2px at 15% 90%, #00e5ff22 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 50%, #00e5ff11 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Navigation ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glow);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 20px var(--cyan);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo::before {
  content: '◈';
  font-size: 1.3rem;
  animation: pulse-logo 3s ease-in-out infinite;
}

@keyframes pulse-logo {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--cyan); }
  50%       { opacity: 0.6; text-shadow: 0 0 30px var(--cyan); }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  border-color: var(--cyan-dim);
  background: var(--cyan-dim);
  text-shadow: 0 0 12px var(--cyan);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Page Wrapper ────────────────────────────────────────────── */
.page-content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ─── HOME Hero ───────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 4rem 2rem;
  gap: 3rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 0 40px var(--cyan),
    0 0 80px var(--cyan-dim),
    0 0 2px #fff;
  animation: hero-glow 4s ease-in-out infinite;
  position: relative;
}

.hero-headline::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--cyan);
  opacity: 0;
  animation: glitch 8s infinite;
}

@keyframes hero-glow {
  0%, 100% { text-shadow: 0 0 40px var(--cyan), 0 0 80px var(--cyan-dim); }
  50%       { text-shadow: 0 0 60px var(--cyan), 0 0 120px var(--cyan-dim), 0 0 200px var(--cyan-dim); }
}

@keyframes glitch {
  0%, 90%, 100% { opacity: 0; transform: translate(0); }
  91%  { opacity: 0.7; transform: translate(-3px, 1px); clip-path: inset(20% 0 60% 0); }
  92%  { opacity: 0; }
  94%  { opacity: 0.5; transform: translate(3px, -1px); clip-path: inset(60% 0 20% 0); }
  95%  { opacity: 0; }
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  letter-spacing: 0.3em;
  color: var(--amber);
  text-transform: uppercase;
  margin-top: -2rem;
  text-shadow: 0 0 15px var(--amber);
}

.hero-image-wrap {
  position: relative;
  width: min(820px, 92vw);
  isolation: isolate;
}

.hero-image-wrap::before,
.hero-image-wrap::after {
  content: '';
  position: absolute;
  border: 1px solid var(--cyan);
  opacity: 0.4;
}

.hero-image-wrap::before {
  inset: -10px;
  border-radius: 2px;
  animation: frame-pulse 3s ease-in-out infinite;
}

.hero-image-wrap::after {
  inset: -20px;
  border-radius: 2px;
  opacity: 0.15;
  animation: frame-pulse 3s ease-in-out infinite 1s;
}

@keyframes frame-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}

/* Corner accents */
.hero-image-wrap .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--cyan);
  border-style: solid;
  z-index: 2;
}
.corner.tl { top: -2px; left: -2px;  border-width: 2px 0 0 2px; }
.corner.tr { top: -2px; right: -2px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: -2px; left: -2px;  border-width: 0 0 2px 2px; }
.corner.br { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }

.hero-logo-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #030712;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 0 40px 80px rgba(0,0,0,0.7);
}

.hero-image {
  width: 104%;
  display: block;
  margin: -1.5% -2%;
  filter: saturate(1.1) contrast(1.05);
  transform-origin: 42% 50%;
  animation: logo-cinematic-drift 18s ease-in-out infinite;
  will-change: transform, filter;
}

.animated-logo-scene .logo-aura {
  position: absolute;
  inset: -38px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 27% 50%, rgba(255, 149, 0, 0.32), transparent 24%),
    radial-gradient(circle at 39% 50%, rgba(0, 229, 255, 0.24), transparent 31%),
    radial-gradient(circle at 72% 42%, rgba(0, 229, 255, 0.12), transparent 33%);
  filter: blur(18px);
  opacity: 0.75;
  animation: logo-aura-pulse 7s ease-in-out infinite;
}

.logo-star-dust,
.logo-portal-glow,
.logo-engine-glow,
.logo-scanline {
  position: absolute;
  pointer-events: none;
}

.logo-star-dust {
  inset: 0;
  z-index: 2;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(0,229,255,0.55), transparent),
    radial-gradient(1px 1px at 51% 21%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 73% 75%, rgba(255,149,0,0.45), transparent),
    radial-gradient(1px 1px at 88% 34%, rgba(255,255,255,0.75), transparent);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: logo-star-drift 12s linear infinite;
}

.logo-portal-glow {
  left: 10%;
  top: 7%;
  width: 31%;
  aspect-ratio: 1;
  z-index: 3;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,0.45) 0 7%, rgba(0,229,255,0.26) 12%, transparent 44%),
    conic-gradient(from 0deg, transparent 0 12%, rgba(255,149,0,0.45) 15%, transparent 21%, rgba(0,229,255,0.28) 48%, transparent 62%, rgba(255,255,255,0.24) 80%, transparent 100%);
  filter: blur(1px);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: logo-portal-spin 16s linear infinite, logo-portal-breathe 5s ease-in-out infinite;
}

.logo-engine-glow {
  left: 50%;
  top: 38%;
  width: 15%;
  height: 20%;
  z-index: 3;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.5), rgba(0, 229, 255, 0.14) 38%, transparent 68%);
  filter: blur(10px);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: logo-engine-pulse 2.8s ease-in-out infinite;
}

.logo-scanline {
  inset: 0;
  z-index: 4;
  background: linear-gradient(105deg, transparent 34%, rgba(255,255,255,0.08) 45%, rgba(0,229,255,0.2) 50%, rgba(255,255,255,0.05) 55%, transparent 66%);
  mix-blend-mode: screen;
  transform: translateX(-130%);
  animation: logo-scan 6.5s ease-in-out infinite;
}

@keyframes logo-cinematic-drift {
  0%, 100% { transform: translate3d(-0.8%, 0, 0) scale(1.015); filter: saturate(1.08) contrast(1.04); }
  45%      { transform: translate3d(1.2%, -0.7%, 0) scale(1.04); filter: saturate(1.2) contrast(1.08); }
  70%      { transform: translate3d(0.3%, 0.5%, 0) scale(1.025); filter: saturate(1.14) contrast(1.06); }
}

@keyframes logo-aura-pulse {
  0%, 100% { opacity: 0.48; transform: scale(0.98); }
  50%      { opacity: 0.9; transform: scale(1.04); }
}

@keyframes logo-star-drift {
  from { transform: translate3d(0, 0, 0); opacity: 0.35; }
  50%  { opacity: 0.7; }
  to   { transform: translate3d(-2%, 1.5%, 0); opacity: 0.35; }
}

@keyframes logo-portal-spin {
  to { transform: rotate(360deg); }
}

@keyframes logo-portal-breathe {
  0%, 100% { opacity: 0.42; filter: blur(1px); }
  50%      { opacity: 0.72; filter: blur(2px); }
}

@keyframes logo-engine-pulse {
  0%, 100% { opacity: 0.35; transform: scaleX(0.9); }
  50%      { opacity: 0.85; transform: scaleX(1.12); }
}

@keyframes logo-scan {
  0%, 18%   { transform: translateX(-130%); opacity: 0; }
  34%       { opacity: 1; }
  48%, 100% { transform: translateX(130%); opacity: 0; }
}

.hero-image-placeholder {
  width: 100%;
  aspect-ratio: 16/7;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.hero-image-placeholder .icon { font-size: 3rem; opacity: 0.3; }

/* Scroll hint */
.scroll-hint {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bob 2s ease-in-out infinite;
}

.scroll-hint::after {
  content: '▼';
  color: var(--cyan);
  opacity: 0.6;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ─── Inner Page Layout ───────────────────────────────────────── */
.inner-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 30px var(--cyan);
  margin-bottom: 0.5rem;
}

.title-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.title-bar::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.page-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.page-body strong {
  color: var(--cyan);
  font-weight: 600;
}

.page-body a {
  color: #78f4ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(120, 244, 255, 0.55);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.28);
  overflow-wrap: anywhere;
  transition: color var(--transition), border-color var(--transition), text-shadow var(--transition);
}

.page-body a:hover,
.page-body a:focus {
  color: #ffffff;
  border-bottom-color: var(--amber);
  text-shadow: 0 0 16px rgba(255, 149, 0, 0.35);
}

.page-body br + br { display: block; content: ''; margin-top: 0.5rem; }

/* Rules numbered styling */
.rules-list {
  counter-reset: rules;
}

/* Shop card */
.shop-card {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  text-align: center;
}

.btn-shop {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.9rem 2.5rem;
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-shadow: 0 0 10px var(--amber-dim);
}

.btn-shop:hover {
  background: var(--amber-dim);
  box-shadow: 0 0 20px var(--amber-dim);
  text-shadow: 0 0 15px var(--amber);
}

/* ─── Footer ──────────────────────────────────────────────────── */
/* Homeworld overview */
.homeworlds-page {
  max-width: 1180px;
}

.homeworlds-page .page-title {
  text-shadow:
    0 0 22px rgba(0, 229, 255, 0.5),
    0 0 46px rgba(0, 229, 255, 0.22);
}

.homeworld-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.homeworld-summary > div {
  background:
    linear-gradient(145deg, rgba(20, 37, 57, 0.94), rgba(10, 18, 34, 0.96));
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 40px rgba(0,0,0,0.34),
    0 0 22px rgba(0,229,255,0.08);
}

.summary-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--cyan);
}

.summary-value.free { color: #2ed573; }
.summary-value.occupied { color: var(--amber); }

.summary-label {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9bb7c9;
}

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

.homeworld-card {
  background:
    linear-gradient(145deg, rgba(18, 31, 50, 0.96), rgba(9, 17, 31, 0.98));
  border: 1px solid rgba(66, 113, 139, 0.42);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 34px rgba(0,0,0,0.32);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.homeworld-card.free {
  border-left-color: #2ed573;
  background:
    linear-gradient(145deg, rgba(17, 43, 42, 0.96), rgba(9, 22, 29, 0.98));
  border-color: rgba(46, 213, 115, 0.28);
}

.homeworld-card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 18px 44px rgba(0,0,0,0.38),
    0 0 28px rgba(0,229,255,0.12);
  transform: translateY(-2px);
}

.homeworld-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.homeworld-card h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #f1fbff;
  margin: 0;
  text-shadow: 0 0 12px rgba(0,229,255,0.2);
}

.status-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 149, 0, 0.65);
  color: #ffc066;
  background: rgba(255, 149, 0, 0.12);
  border-radius: var(--radius);
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-chip.free {
  border-color: rgba(46, 213, 115, 0.72);
  color: #7bed9f;
  background: rgba(46, 213, 115, 0.12);
}

.homeworld-coordinates {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
  overflow-wrap: anywhere;
}

.homeworld-meta {
  display: grid;
  gap: 0.75rem;
}

.homeworld-meta dt {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9bb7c9;
}

.homeworld-meta dd {
  margin: 0.2rem 0 0;
  color: #e8f6fb;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.homeworld-info-button {
  width: 100%;
  margin-top: 1rem;
  border: 1px solid rgba(0, 229, 255, 0.45);
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.9), rgba(0, 118, 196, 0.92));
  color: #ffffff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.68rem 0.9rem;
  text-transform: uppercase;
}

.homeworld-info-button:hover {
  filter: brightness(1.08);
}

.homeworld-info-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 8, 15, 0.72);
}

.homeworld-info-modal.open {
  display: flex;
}

.homeworld-info-dialog {
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  display: flex;
  flex-direction: column;
  background: #292a35;
  border: 1px solid rgba(160, 170, 190, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 1.5rem;
}

.homeworld-info-dialog h2 {
  margin: 0 0 1.1rem;
  color: #00a8ff;
  font-size: 1.05rem;
}

.homeworld-info-list {
  overflow-y: auto;
  display: grid;
  gap: 0.7rem;
  padding-right: 0.65rem;
}

.homeworld-info-row {
  border-left: 4px solid var(--amber);
  border-radius: 5px;
  background: #1c1d25;
  padding: 0.9rem 1rem;
}

.homeworld-info-row.specific {
  border-left-color: #2ed573;
}

.homeworld-info-row-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.homeworld-info-row-head strong {
  color: #00a8ff;
  font-size: 0.92rem;
}

.homeworld-info-row-head span {
  color: #2ed573;
  font-size: 0.66rem;
}

.homeworld-info-group {
  margin-top: 0.55rem;
}

.homeworld-info-group b {
  display: block;
  margin-bottom: 0.25rem;
  color: #f1fbff;
  font-size: 0.78rem;
}

.homeworld-info-group em,
.homeworld-info-empty {
  color: #8f95a3;
  font-size: 0.78rem;
}

.homeworld-player-tag,
.homeworld-faction-tag {
  display: inline-block;
  margin: 0 0.25rem 0.25rem 0;
  border-radius: 4px;
  padding: 0.18rem 0.42rem;
  font-size: 0.72rem;
}

.homeworld-player-tag {
  border: 1px solid #a55eed;
  color: #ffffff;
}

.homeworld-faction-tag {
  border: 1px solid #ffa500;
  color: #ffa500;
}

.homeworld-info-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

.homeworld-info-close {
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: #7b8496;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.65rem 1rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-glow);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--cyan);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.site-footer a:hover { opacity: 1; }

/* ─── Admin Styles ────────────────────────────────────────────── */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.admin-login-box {
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  position: relative;
}

.admin-login-box::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.admin-logo {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-align: center;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.admin-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 2rem;
  color: #fff;
}

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan-dim);
  background: rgba(0, 229, 255, 0.06);
}

.form-textarea { min-height: 140px; }
.form-textarea.tall { min-height: 240px; }

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-shadow: 0 0 10px var(--cyan);
}

.btn-primary:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 20px var(--cyan-dim);
}

.error-msg {
  background: rgba(255, 60, 90, 0.1);
  border: 1px solid var(--red-alert);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--red-alert);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.success-banner {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Admin Dashboard */
.admin-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glow);
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-shadow: 0 0 15px var(--cyan);
}

.admin-header h1 span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--red-alert);
  color: var(--red-alert);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(255, 60, 90, 0.1);
  box-shadow: 0 0 10px rgba(255, 60, 90, 0.2);
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.section-header {
  padding: 1rem 1.5rem;
  background: rgba(0, 229, 255, 0.04);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header::before { content: '▸'; color: var(--cyan); }

.section-body { padding: 1.5rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-save {
  padding: 1rem 3rem;
  background: var(--amber-dim);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-shadow: 0 0 10px var(--amber-dim);
  margin-top: 1rem;
}

.btn-save:hover {
  background: rgba(255, 149, 0, 0.15);
  box-shadow: 0 0 25px var(--amber-dim);
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-style: italic;
}

/* ─── 404 ─────────────────────────────────────────────────────── */
/* Heller CMS-Modus fuer die eingebettete Homepage-Verwaltung */
body.admin-cms-page {
  background: #eef3f8;
  color: #182230;
}

body.admin-cms-page::before {
  background-image:
    linear-gradient(135deg, rgba(0, 168, 255, 0.08) 0%, transparent 36%),
    radial-gradient(1px 1px at 12% 18%, rgba(24, 34, 48, 0.12) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 30%, rgba(0, 168, 255, 0.16) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 82%, rgba(255, 149, 0, 0.12) 0%, transparent 100%);
}

body.admin-cms-page::after {
  background-image:
    linear-gradient(rgba(0, 96, 140, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 96, 140, 0.055) 1px, transparent 1px);
}

body.admin-cms-page .admin-wrap {
  max-width: 1000px;
}

body.admin-cms-page .admin-header {
  border-bottom-color: rgba(0, 96, 140, 0.18);
}

body.admin-cms-page .admin-header h1 {
  color: #006fa8;
  text-shadow: none;
}

body.admin-cms-page .admin-header h1 span,
body.admin-cms-page .hint,
body.admin-cms-page .form-label {
  color: #5f6f81;
}

body.admin-cms-page .admin-header a:not(.btn-logout) {
  background: #ffffff;
  border-color: #c9d7e4 !important;
  color: #355064 !important;
  box-shadow: 0 8px 20px rgba(24, 34, 48, 0.08);
}

body.admin-cms-page .admin-section {
  background: #ffffff;
  border-color: #d7e2ec;
  box-shadow: 0 14px 35px rgba(24, 34, 48, 0.08);
}

body.admin-cms-page .section-header {
  background: #e7f3fb;
  border-bottom-color: #c7ddeb;
  color: #9b5a00;
}

body.admin-cms-page .section-header::before {
  color: #007bb8;
}

body.admin-cms-page .form-input,
body.admin-cms-page .form-textarea {
  background: #f7fafc;
  border-color: #c8d6e2;
  color: #162434;
}

body.admin-cms-page .form-input:focus,
body.admin-cms-page .form-textarea:focus {
  background: #ffffff;
  border-color: #008dd2;
  box-shadow: 0 0 0 3px rgba(0, 141, 210, 0.14);
}

body.admin-cms-page .success-banner {
  background: #e6f7ee;
  border-color: #52b879;
  color: #146c3f;
}

body.admin-cms-page .btn-save {
  background: #006fa8;
  border-color: #006fa8;
  color: #ffffff;
  text-shadow: none;
  box-shadow: 0 12px 24px rgba(0, 111, 168, 0.18);
}

body.admin-cms-page .btn-save:hover {
  background: #005d8d;
  box-shadow: 0 14px 28px rgba(0, 111, 168, 0.24);
}

body.admin-cms-page .btn-logout {
  background: #fff5f6;
  border-color: #d84155;
  color: #bd2035;
}

.page-404 {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}

.page-404 .code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  color: var(--red-alert);
  line-height: 1;
  text-shadow: 0 0 40px rgba(255, 60, 90, 0.4);
}

.page-404 p { color: var(--text-muted); }

.page-404 a {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  border-radius: var(--radius);
  transition: var(--transition);
}

.page-404 a:hover { background: var(--cyan-dim); }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glow);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .nav-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
}

/* ─── Animations ──────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero > * {
  animation: fade-up 0.7s ease both;
}

.hero > *:nth-child(1) { animation-delay: 0.1s; }
.hero > *:nth-child(2) { animation-delay: 0.2s; }
.hero > *:nth-child(3) { animation-delay: 0.35s; }
.hero > *:nth-child(4) { animation-delay: 0.55s; }

.inner-page {
  animation: fade-up 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-image,
  .animated-logo-scene .logo-aura,
  .logo-star-dust,
  .logo-portal-glow,
  .logo-engine-glow,
  .logo-scanline {
    animation: none;
  }

  .hero-image {
    transform: none;
  }
}
