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

:root {
  --bg:        #04060f;
  --bg-card:   #0a0e1f;
  --bg-dark:   #060912;
  --accent:    #4f8fff;
  --accent2:   #a855f7;
  --green:     #22c55e;
  --yellow:    #eab308;
  --red:       #ef4444;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --border:    rgba(79,143,255,0.15);
  --glow:      rgba(79,143,255,0.25);
  --font-head: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ── STARS CANVAS ── */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(4,6,15,0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 20px;
}

.nav-logo { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 2px; flex-shrink: 0; }
.logo-ok   { color: var(--accent); }
.logo-game { color: var(--text); }

.nav-links { list-style: none; display: flex; gap: 32px; flex: 1; justify-content: center; }
.nav-links a {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-auth { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-player {
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  display: inline-block;
}
.btn-sm { padding: 8px 18px; font-size: 0.6rem; }
.btn-full { width: 100%; text-align: center; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(79,143,255,0.35);
}
.btn-primary:hover {
  background: #6ca3ff;
  box-shadow: 0 0 36px rgba(79,143,255,0.55);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4,6,15,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 36px;
  width: min(440px, 94vw);
  position: relative;
  box-shadow: 0 0 80px rgba(79,143,255,0.12);
}

.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

.modal-logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 28px;
}

.modal-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 28px;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(79,143,255,0.4);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-label input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.auth-label input:focus { border-color: var(--accent); }
.auth-label input::placeholder { color: var(--muted); opacity: 0.5; }

.auth-error {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--red);
  min-height: 20px;
  text-align: center;
}
.auth-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--green);
  min-height: 20px;
  text-align: center;
}

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(79,143,255,0.08) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 30% 80%, rgba(0,0,0,0.07) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 2; max-width: 680px; }

.hero-badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 16px;
  border-radius: 4px;
  margin-bottom: 28px;
  background: rgba(79,143,255,0.06);
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero-ok   { color: var(--accent); }
.hero-dash { color: var(--muted); }
.hero-game { color: var(--text); }

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }

.tag {
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}
.tag-future {
  border-color: rgba(168,85,247,0.4);
  color: #c084fc;
  background: rgba(168,85,247,0.07);
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Planet */
.hero-planet {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(300px, 40vw, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #1a2a6c 0%, #0d1535 40%, #060912 70%, transparent 100%);
  box-shadow:
    inset -30px -20px 60px rgba(79,143,255,0.15),
    0 0 80px rgba(79,143,255,0.1),
    0 0 200px rgba(79,143,255,0.05);
  z-index: 1;
  animation: planet-rotate 60s linear infinite;
}
.hero-planet::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(79,143,255,0.1);
  box-shadow: 0 0 40px rgba(79,143,255,0.08);
}
@keyframes planet-rotate {
  from { box-shadow: inset -30px -20px 60px rgba(79,143,255,0.15), 0 0 80px rgba(79,143,255,0.1), 0 0 200px rgba(79,143,255,0.05); }
  50%  { box-shadow: inset 30px -20px 60px rgba(168,85,247,0.12), 0 0 80px rgba(168,85,247,0.08), 0 0 200px rgba(168,85,247,0.04); }
  to   { box-shadow: inset -30px -20px 60px rgba(79,143,255,0.15), 0 0 80px rgba(79,143,255,0.1), 0 0 200px rgba(79,143,255,0.05); }
}

/* ── SECTIONS ── */
.section { position: relative; z-index: 1; padding: 100px 0; }
.section-dark { background: var(--bg-dark); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 48px; }

.section-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text);
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-top: 12px;
}
.section-sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 48px; }

/* ── STATUS ── */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}
.status-card:hover { border-color: rgba(79,143,255,0.35); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-online      { background: var(--green);  box-shadow: 0 0 8px var(--green);  animation: pulse-green 2s infinite; }
.dot-maintenance { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); animation: pulse-yellow 2s infinite; }
.dot-offline     { background: var(--red);    box-shadow: 0 0 8px var(--red); }
.dot-planned     { background: var(--muted);  box-shadow: none; }

@keyframes pulse-green  { 0%,100%{opacity:1} 50%{opacity:0.5} }
@keyframes pulse-yellow { 0%,100%{opacity:1} 50%{opacity:0.4} }

.status-info { flex: 1; display: flex; flex-direction: column; }
.status-name { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.status-val  { font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.status-val.online      { color: var(--green); }
.status-val.maintenance { color: var(--yellow); }
.status-val.offline     { color: var(--red); }
.status-val.planned     { color: var(--muted); }
.status-ping { font-family: var(--font-head); font-size: 0.7rem; color: var(--muted); letter-spacing: 1px; }
.status-note { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* ── NEWS ── */
.news-list { display: grid; gap: 20px; }

/* Make whole card a link */
.news-card-link {
  display: block;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.2s;
}
.news-card-link:hover { transform: translateX(4px); }
.news-card-link:hover .news-card { border-color: rgba(79,143,255,0.45); }

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  transition: border-color 0.2s;
}
.news-featured {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, rgba(79,143,255,0.04) 0%, var(--bg-card) 100%);
}

.news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.news-date { font-family: var(--font-head); font-size: 0.65rem; letter-spacing: 2px; color: var(--muted); }

.news-label {
  font-family: var(--font-head);
  font-size: 0.55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
}
.label-update   { background: rgba(79,143,255,0.15);  color: var(--accent); border: 1px solid rgba(79,143,255,0.3); }
.label-patch    { background: rgba(34,197,94,0.12);   color: var(--green);  border: 1px solid rgba(34,197,94,0.25); }
.label-announce { background: rgba(168,85,247,0.12);  color: #c084fc;       border: 1px solid rgba(168,85,247,0.3); }
.label-devlog   { background: rgba(100,116,139,0.12); color: var(--muted);  border: 1px solid rgba(100,116,139,0.25); }

.news-title { font-family: var(--font-head); font-size: 1rem; font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; color: var(--text); }
.news-body  { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.news-itchio {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── COMMUNITY LINKS ── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s;
}
.link-card:hover::before { opacity: 1; }
.link-card:hover { transform: translateY(-4px); }

.link-yt-pl  { --c: #ff0000; }
.link-yt-en  { --c: #cc0000; }
.link-twitch { --c: #9146ff; }
.link-discord{ --c: #5865f2; }

.link-card:hover { border-color: var(--c); box-shadow: 0 8px 32px color-mix(in srgb, var(--c) 20%, transparent); }
.link-card::before { background: radial-gradient(ellipse at top left, color-mix(in srgb, var(--c) 8%, transparent), transparent 60%); }

.link-icon { color: var(--c); flex-shrink: 0; }
.link-icon svg { width: 28px; height: 28px; }
.link-text { display: flex; flex-direction: column; gap: 3px; }
.link-label { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.link-lang  { font-size: 0.8rem; color: var(--muted); }

/* ── FOOTER ── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  text-align: center;
}
.footer-logo { font-family: var(--font-head); font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 20px; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.footer-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--muted); opacity: 0.5; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 14px 24px; }
  .nav-links { gap: 20px; }
  .hero { padding: 100px 24px 60px; }
  .hero-planet { display: none; }
  .container { padding: 0 24px; }
  .status-grid, .links-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .status-grid, .links-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
