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

:root {
  --cyan: #22d3ee;
  --pink: #f472b6;
  --bg: #09090b;
  --panel: #131316;
  --panel-2: #1a1a1f;
  --text: #fafafa;
  --muted: #71717a;
  --border: rgba(255, 255, 255, 0.07);
  --discord: #5865f2;
  --max: 920px;
  --r: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Layout ── */
.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100vh;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  border-radius: 8px;
}

.brand span {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-ghost {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
}

.btn-discord:hover {
  background: #4752c4;
}

.btn-store {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fbbf24;
}

.btn-store:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fcd34d;
}

/* ── Store banner ── */
.store-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, var(--panel) 60%);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.store-banner:hover {
  border-color: rgba(251, 191, 36, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.store-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(251, 191, 36, 0.12);
  border-radius: 10px;
  color: #fbbf24;
  flex-shrink: 0;
}

.store-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.store-banner-text strong {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

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

.store-banner-arrow {
  font-size: 1.1rem;
  color: #fbbf24;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.store-banner:hover .store-banner-arrow {
  transform: translateX(3px);
  opacity: 1;
}

.hero {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  border: 1px solid var(--border);
  background: #000;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
  pointer-events: none;
}

.player-count {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.player-count-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.player-count.is-online .player-count-dot {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}

.player-count.is-offline .player-count-dot {
  background: #71717a;
}

.countdown-bar {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(16px);
}

.cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.8rem;
}

.cd span {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cd small {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.cd-colon {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  color: var(--muted);
  opacity: 0.35;
  padding-bottom: 0.7rem;
  font-size: 1rem;
}

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  flex: 1;
}

.panel {
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Community panel ── */
.panel-community {
  background: linear-gradient(165deg, #151518 0%, #0f0f12 100%);
  border-color: rgba(244, 114, 182, 0.1);
  position: relative;
}

.panel-community::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 114, 182, 0.3), transparent);
  z-index: 2;
}

.community-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.community-photo {
  position: relative;
  height: 140px;
  overflow: hidden;
  flex-shrink: 0;
}

.community-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.photo-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, #0f0f12 100%);
}

.community-body {
  padding: 0 1.4rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: -0.5rem;
  position: relative;
}

.community-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.community-head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(244, 114, 182, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 8px;
  color: var(--pink);
}

.community-head h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.community-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.community-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.community-list li:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
}

.cl-tag {
  flex-shrink: 0;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  min-width: 3.2rem;
  text-align: center;
  margin-top: 0.1rem;
}

.cl-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cl-text strong {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.cl-text span {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.cl-text a {
  color: var(--pink);
  font-weight: 600;
  text-decoration: none;
}

.cl-text a:hover { text-decoration: underline; }

/* ── Join panel ── */
.panel-join {
  background: linear-gradient(165deg, #151518 0%, #0f0f12 100%);
  border-color: rgba(34, 211, 238, 0.12);
  position: relative;
}

.panel-join::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.35), transparent);
}

.join-inner {
  padding: 1.35rem 1.4rem 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.join-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.join-head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 8px;
  color: var(--cyan);
}

.join-head h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.mc-window {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.04),
    inset -2px -2px 0 rgba(0, 0, 0, 0.5);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mc-row label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a1a1aa;
  margin-bottom: 0.35rem;
}

.mc-slot {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: #0a0a0c;
  border: 2px solid #000;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--cyan);
}

.mc-slot-ip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s, box-shadow 0.2s;
}

.mc-slot-ip:hover {
  color: var(--cyan);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.mc-slot-ip svg {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.mc-slot-ip:hover svg { opacity: 0.9; color: var(--cyan); }

.join-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto;
  position: relative;
  padding-left: 0.15rem;
}

.join-steps::before {
  content: '';
  position: absolute;
  left: 0.85rem;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.join-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.84rem;
  color: var(--muted);
  position: relative;
}

.step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  background: var(--panel-2);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.join-step.active .step-dot {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--cyan);
}

.join-step.active {
  color: var(--text);
}

.join-step a {
  color: var(--pink);
  font-weight: 600;
  text-decoration: none;
}

.join-step a:hover { text-decoration: underline; }

.join-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--discord);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.25);
}

.join-cta:hover {
  background: #4752c4;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.35);
}

.join-cta:active { transform: scale(0.98); }

/* ── Footer ── */
.footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding-top: 0.5rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  padding: 0.7rem 1.2rem;
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .site { padding: 1rem; gap: 1rem; }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .btn { justify-content: center; }

  .hero { aspect-ratio: 16 / 10; }

  .grid {
    grid-template-columns: 1fr;
  }

  .countdown-bar {
    width: calc(100% - 2rem);
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .btn-ghost span,
  .btn-ghost { font-size: 0.75rem; }
}
