/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
  --accent: #22c55e;
  --accent2: #16a34a;
  --bg: #0b0d11;
  --bg2: #10131a;
  --bg3: #14181f;
  --card: #12161d;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #eef2ff;
  --muted: #6b7590;
  --font-head: 'Exo 2', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ── LIGHT MODE ── */
[data-theme="light"] {
  --bg: #f4f6f9;
  --bg2: #ffffff;
  --bg3: #eef1f6;
  --card: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.15);
  --text: #0f172a;
  --muted: #5a6480;
  --accent: #16a34a;
  --accent2: #15803d;
}
[data-theme="light"] nav { background: rgba(244,246,249,0.95); }
[data-theme="light"] .btn-nav-outline:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .nav-links a:hover { color: var(--text); }

/* ── BASE ── */
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); overflow-x: clip; transition: background-color 0.3s, color 0.3s; }

/* ── NAV ── */
.btn-nav-outline { color: var(--text); font-weight: 600; padding: 0.45rem 1.1rem; border-radius: 8px; text-decoration: none; font-size: 0.85rem; font-family: var(--font-head); border: 1px solid var(--border2); background: transparent; transition: background 0.2s; }
.btn-nav-outline:hover { background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--text); }

#header { position: sticky; top: 0; z-index: 200; }
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 96px;
  background: rgba(11,13,17,0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: height 0.25s ease, box-shadow 0.25s ease;
}
nav.nav-scrolled { height: 64px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.nav-logo { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; text-decoration: none; transition: font-size 0.25s ease; }
nav.nav-scrolled .nav-logo { font-size: 1.5rem; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.btn-nav-green { background: var(--accent); color: #fff; font-weight: 700; padding: 0.45rem 1.25rem; border-radius: 8px; text-decoration: none; font-size: 0.85rem; font-family: var(--font-head); border: none; transition: background 0.2s, transform 0.15s; cursor: pointer; }
.btn-nav-green:hover { background: var(--accent2); transform: translateY(-1px); }
@media(max-width:768px) { .nav-links { display: none; } nav { padding: 0 1.25rem; } }
.btn-nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border2); color: var(--muted); transition: border-color 0.2s, color 0.2s; }
.btn-nav-icon .icon-discord { width: 18px; height: 18px; }
.btn-nav-icon:hover { border-color: #5865f2; color: #5865f2; }

/* ── ICONS (masked SVG, tintable via currentColor) ── */
.icon-discord {
  display: inline-block; background-color: currentColor;
  -webkit-mask: url('/images/svg/discord.svg') no-repeat center / contain;
  mask: url('/images/svg/discord.svg') no-repeat center / contain;
}
.server-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.25); color: #86efac; white-space: nowrap; }
.server-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; flex-shrink: 0; }
.server-badge.offline { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); color: #fca5a5; }
.server-badge.offline::before { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
@media(max-width:480px) { .server-badge { display: none; } }

/* ── PLAY POPUP ── */
.play-popup { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1.25rem; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.play-popup.active { opacity: 1; pointer-events: all; }
body.popup-open { overflow: hidden; }
.play-popup-content { position: relative; background: var(--card); border: 1px solid var(--border2); border-radius: 16px; padding: 2rem 1.8rem; max-width: 460px; width: 100%; max-height: calc(100vh - 2.5rem); overflow-y: auto; transform: translateY(12px); transition: transform 0.25s; }
.play-popup.active .play-popup-content { transform: translateY(0); }
.play-popup-label { font-family: var(--font-head); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 0.5rem; }
.play-popup-content h2 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; margin-bottom: 0.75rem; }
.play-popup-content p { font-size: 0.9rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.1rem; }
.play-popup-note { font-size: 0.78rem !important; margin-top: 0.9rem !important; margin-bottom: 0 !important; }
.play-popup-close { position: absolute; top: 0.9rem; right: 0.9rem; background: none; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; line-height: 1; }
.play-popup-close:hover { color: var(--text); }
.play-steps { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.1rem; }
.play-step {
  display: flex; align-items: center; justify-content: space-between; gap: 0.9rem; width: 100%;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; padding: 0.5rem;
  cursor: pointer; transition: border-color 0.2s, transform 0.2s; font: inherit; text-align: left;
}
.play-step:hover { border-color: var(--accent); transform: translateY(-1px); }
.play-step-img { width: 76px; height: 76px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.play-step-num { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 0.4rem; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--font-head); font-size: 0.85rem; font-weight: 800; }
.play-ip-box { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px; padding: 0.7rem 0.9rem; font-family: var(--font-head); font-weight: 700; }
.play-ip-box button { background: var(--accent); color: #fff; border: none; border-radius: 7px; padding: 0.4rem 0.85rem; font-size: 0.78rem; font-weight: 700; font-family: var(--font-head); cursor: pointer; transition: background 0.2s; }
.play-ip-box button:hover { background: var(--accent2); }

/* ── STEP LIGHTBOX ── */
.step-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 350; display: flex; align-items: center; justify-content: center; padding: 1.25rem; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.step-lightbox.active { opacity: 1; pointer-events: all; }
.step-lightbox-content { position: relative; background: var(--card); border: 1px solid var(--border2); border-radius: 16px; padding: 1.5rem; max-width: 420px; width: 100%; text-align: center; }
.step-lightbox-content img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; }
.step-lightbox-content p { font-size: 0.92rem; color: var(--text); line-height: 1.6; margin: 0; }
.step-lightbox-close { position: absolute; top: 0.8rem; right: 0.8rem; background: none; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; line-height: 1; }
.step-lightbox-close:hover { color: var(--text); }

/* ── OFFLINE BANNER ── */
#offline-banner {
  position: fixed; top: 1rem; left: 50%; z-index: 400;
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--bg2); border: 1px solid rgba(239,68,68,0.35); color: var(--text);
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  padding: 0.6rem 1.1rem; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.25s, transform 0.25s;
}
#offline-banner.visible { opacity: 1; transform: translate(-50%, 0); }
#offline-banner .offline-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 6px #ef4444; flex-shrink: 0; }
#offline-banner.offline-banner--ok { border-color: rgba(34,197,94,0.35); }
#offline-banner.offline-banner--ok .offline-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* ── FIXED ACTIONS (Theme-Toggle + Back-to-Top) ── */
.fixed-actions { position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 150; display: flex; flex-direction: column; gap: 0.75rem; }
.fixed-actions .theme-toggle,
.fixed-actions #back-top { width: 42px; height: 42px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--border2); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s; }
.fixed-actions .theme-toggle:hover,
.fixed-actions #back-top:hover { border-color: var(--accent); color: var(--accent); }
.fixed-actions #back-top { opacity: 0; pointer-events: none; transform: translateY(8px); }
.fixed-actions #back-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }

/* ── SHARED LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; }
.section-label { display: inline-block; font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.section-title { font-family: var(--font-head); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 0.6rem; }
.section-sub { font-size: 0.95rem; color: var(--muted); line-height: 1.7; max-width: 480px; margin-bottom: 2.5rem; }
.divider { width: 44px; height: 3px; background: var(--accent); border-radius: 99px; }
.btn-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── DISCORD ── */
.discord-section { padding: 2rem 2rem 3.5rem; background: var(--bg); }
.discord-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.75rem 2rem; border-radius: 16px; background: linear-gradient(135deg, #5865f2, #4752c4); color: #fff; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 8px 30px rgba(88,101,242,0.3); max-width: 1100px; margin: 0 auto; }
.discord-inner { display: flex; align-items: center; gap: 1.1rem; }
.discord-logo { width: 52px; height: 52px; background: rgba(255,255,255,0.15); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.discord-logo .icon-discord { width: 28px; height: 28px; }
.discord-card h2 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.3px; color: #fff; margin: 0 0 0.3rem; }
.discord-card p { font-size: 0.85rem; color: rgba(255,255,255,0.85); line-height: 1.5; max-width: 420px; margin: 0; }
#discord-stats { display: flex; gap: 0.6rem; justify-content: flex-start; flex-wrap: wrap; margin-top: 0.6rem; }
.discord-pill { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 999px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff; }
.discord-pulse { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); } 50% { box-shadow: 0 0 0 5px rgba(74,222,128,0); } }
a.discord-card--link { text-decoration: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
a.discord-card--link:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(88,101,242,0.45); }
.btn-discord { display: inline-flex; align-items: center; gap: 0.6rem; background: #fff; color: #5865f2; font-weight: 700; padding: 0.8rem 1.6rem; border-radius: 10px; text-decoration: none; font-size: 0.92rem; font-family: var(--font-head); transition: background 0.2s, transform 0.15s; border: 0; flex-shrink: 0; }
.btn-discord .icon-discord { width: 18px; height: 18px; }
.btn-discord:hover { background: #eef0ff; transform: translateY(-2px); }

/* ── FOOTER ── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 3.5rem 2rem 2rem; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media(max-width:820px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-bottom: 0.65rem; }
.footer-brand p { font-size: 0.83rem; color: var(--muted); line-height: 1.65; max-width: 240px; }
.footer-col h4 { font-family: var(--font-head); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul a { color: var(--muted); text-decoration: none; font-size: 0.83rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--text); }
.footer-bottom { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; border-top: 1px solid var(--border); padding-top: 1.5rem; font-size: 0.77rem; color: var(--muted); }
