:root {
  --bg: #04101f;
  --bg-2: #071a33;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(120, 200, 255, 0.14);
  --text: #e8f3ff;
  --muted: #8aa6c4;
  --accent: #2fd6ff;
  --accent-2: #3a7bff;
  --pink: #ff2d6f;
  --gold: #ffd166;
  --silver: #cfd8e3;
  --bronze: #e0995e;
  --radius: 16px;
  --maxw: 1000px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, var(--bg-2), var(--bg) 70%) fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(4, 16, 31, 0.7);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-links a.active { color: var(--bg); background: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Hero (Landing) ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 16px 200px;
  overflow: hidden;
}
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 700;
}
.banner {
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent) 55%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(47, 214, 255, 0.25));
}
.hero-sub {
  margin-top: 22px;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.1rem;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-tiktok {
  background: #000;
  color: #fff;
  box-shadow: -3px -3px 0 var(--accent), 3px 3px 0 var(--pink);
}
.btn-tiktok:hover { box-shadow: -4px -4px 0 var(--accent), 4px 4px 0 var(--pink); }
.btn-ghost {
  border: 1px solid var(--card-border);
  background: var(--card);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Wellen */
.waves {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 180px;
  pointer-events: none;
}
.waves svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
}
.wave-1 { animation: drift 14s linear infinite; opacity: .35; }
.wave-2 { animation: drift 9s linear infinite reverse; opacity: .55; }
.wave-3 { animation: drift 6s linear infinite; opacity: .9; }
@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Kategorie-Karten auf Landing */
.categories {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: -120px auto 60px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.cat-card {
  background: rgba(7, 26, 51, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s, border-color .2s;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.cat-card h2 { font-size: 1.4rem; margin-bottom: 6px; }
.cat-card p { color: var(--muted); font-size: .95rem; }
.cat-card .arrow { color: var(--accent); font-weight: 700; margin-top: 14px; display: inline-block; }

/* ---------- Ranking-Seiten ---------- */
.page-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 16px 30px;
  text-align: center;
}
.page-head h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head p { color: var(--muted); margin-top: 10px; }

.toolbar {
  max-width: var(--maxw);
  margin: 0 auto 20px;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.search {
  flex: 1 1 240px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.search:focus { border-color: var(--accent); }
.sort {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--text);
  font-size: .95rem;
}

/* Podium */
.podium {
  max-width: var(--maxw);
  margin: 10px auto 30px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 14px;
}
.podium-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform .2s;
}
.podium-item:hover { transform: translateY(-4px); }
.podium-item.p1 { order: 2; padding-top: 34px; border-color: var(--gold); box-shadow: 0 0 40px rgba(255, 209, 102, 0.15); }
.podium-item.p2 { order: 1; border-color: var(--silver); }
.podium-item.p3 { order: 3; border-color: var(--bronze); }
.podium-item .medal { font-size: 1.8rem; line-height: 1; }
.podium-item .name { font-weight: 800; font-size: 1.05rem; word-break: break-word; }
.podium-item .handle { color: var(--muted); font-size: .85rem; word-break: break-all; }
.podium-item .followers { font-weight: 700; color: var(--accent); }

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--pink));
}
.p1 .avatar { width: 76px; height: 76px; font-size: 1.7rem; }

/* Liste */
.ranking {
  max-width: var(--maxw);
  margin: 0 auto 60px;
  padding: 0 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-row {
  display: grid;
  grid-template-columns: 48px 48px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  transition: border-color .2s, background .2s;
}
.rank-row:hover { border-color: var(--accent); background: rgba(47, 214, 255, 0.05); }
.rank-row .pos { font-size: 1.3rem; font-weight: 900; color: var(--muted); text-align: center; }
.rank-row .avatar { width: 44px; height: 44px; font-size: 1rem; }
.rank-row .info { min-width: 0; }
.rank-row .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .handle { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .stat { text-align: right; }
.rank-row .stat strong { display: block; font-size: 1.05rem; }
.rank-row .stat small { color: var(--muted); font-size: .75rem; }
.trend { font-size: .8rem; font-weight: 700; }
.trend.up { color: #3ddc97; }
.trend.down { color: var(--pink); }
.trend.same { color: var(--muted); }
.visit {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
}
.visit:hover { filter: brightness(1.1); }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}
.footer a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 10px 16px 16px;
    background: rgba(4, 16, 31, 0.97);
    border-bottom: 1px solid var(--card-border);
  }
  .nav-links.open { display: flex; }

  .podium { grid-template-columns: 1fr; }
  .podium-item.p1 { order: 1; }
  .podium-item.p2 { order: 2; }
  .podium-item.p3 { order: 3; }

  .rank-row { grid-template-columns: 34px 40px 1fr auto; gap: 10px; padding: 10px 12px; }
  .rank-row .avatar { width: 40px; height: 40px; }
  .rank-row .visit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wave-1, .wave-2, .wave-3 { animation: none; }
}
