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

:root {
  --bg: #050505;
  --bg2: #0B0B0D;
  --card: #0F0F12;
  --border: #1C1C22;
  --text: #F5F5F5;
  --muted: #9A9A9A;
  --accent: #22D3EE;
  --font: -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

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

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: baseline; gap: 8px; }
.logo-main { font-size: 18px; font-weight: 800; letter-spacing: 4px; }
.logo-sub { font-size: 11px; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }

.nav nav { display: flex; gap: 26px; }
.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav nav a:hover { color: var(--text); }

.nav-ip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-ip:hover { background: rgba(34, 211, 238, 0.1); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0); }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  animation: float 12s ease-in-out infinite;
}
.orb-a {
  width: 520px; height: 520px;
  background: var(--accent);
  top: -140px; right: -80px;
}
.orb-b {
  width: 420px; height: 420px;
  background: #5B6BFF;
  bottom: -160px; left: -100px;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 30px); }
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 2px;
}

.hero-desc {
  max-width: 540px;
  margin: 26px 0 34px;
  color: var(--muted);
  font-size: 16px;
}
.hero-desc b { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }

.btn-accent {
  background: var(--text);
  color: #050505;
}
.btn-accent:hover {
  box-shadow: 0 0 32px rgba(245, 245, 245, 0.25);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg2); }

/* ===== Sections ===== */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 28px;
}

.section h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.sub { color: var(--muted); margin-bottom: 30px; font-size: 14px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(34, 211, 238, 0.4); transform: translateY(-3px); }

.card h3 { font-size: 16px; margin-bottom: 10px; font-weight: 600; }
.card p { color: var(--muted); font-size: 14px; }

/* ===== Mods ===== */
.mods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.mod {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.mod-name { font-size: 14px; font-weight: 500; }
.mod-name.required::after { content: "·"; color: var(--accent); margin-left: 5px; }
.mod-ver { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ===== Downloads ===== */
.downloads {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== News ===== */
.news {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }

.news-date {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  width: 52px;
  flex-shrink: 0;
}
.news-text { color: var(--muted); font-size: 14px; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

/* ===== Burger / Mobile menu ===== */
.burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.97);
}
.mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 11px 8px;
  border-radius: 10px;
}
.mobile-menu a:active { background: var(--bg2); color: var(--text); }
.mobile-menu .btn { text-align: center; margin-top: 6px; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: #050505;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) {
  .nav-inner { padding: 12px 16px; gap: 12px; }
  .nav nav { display: none; }
  .burger { display: flex; }
  .mobile-menu { display: flex; }
  .nav-ip { display: none; }

  .hero { min-height: 62vh; }
  .hero-inner { padding: 0 20px; }
  .hero h1 { font-size: clamp(34px, 11vw, 52px); }
  .hero-desc { font-size: 15px; margin: 20px 0 26px; }

  .section { padding: 56px 20px; }
  .section h2 { font-size: 26px; }

  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 20px; }

  .downloads { flex-direction: column; }
  .downloads .btn { width: 100%; text-align: center; }

  .footer-inner { flex-direction: column; gap: 6px; padding: 0 20px; }
  .news-item { gap: 12px; }

  .modal-card { padding: 24px 20px 28px; }
}

@media (max-width: 480px) {
  .hero { min-height: 54vh; }
  .hero-badge { font-size: 12px; padding: 7px 12px; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
}

/* ===== Auth ===== */
.btn-auth {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-family: var(--font);
}
.btn-auth:hover { border-color: rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.08); }

.auth-user { display: flex; align-items: center; gap: 12px; }
.auth-user span { font-size: 13px; color: var(--accent); font-weight: 600; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 32px 34px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.modal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.modal-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--font);
}
.modal-tab.active { background: var(--text); color: #050505; }

.auth-form { display: flex; flex-direction: column; gap: 8px; }

.auth-form label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.auth-form input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.auth-form input:focus { border-color: rgba(34, 211, 238, 0.6); }

.auth-form .btn { margin-top: 18px; text-align: center; border: none; }

[hidden] { display: none !important; }

.form-error {
  color: #F87171;
  font-size: 12px;
  min-height: 16px;
  margin-top: 4px;
}
