@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700;800&family=JetBrains+Mono:wght@600;700&display=swap');

:root {
  /* Direkt aus dem BRH-Logo abgeleitet */
  --teal-deep: #0e4a48;
  --teal: #1a6b68;
  --teal-mint: #3fa89e;
  --gold: #f0b429;
  --gold-dark: #c98a1e;
  --pink: #f7a8b8;
  --pink-dark: #e8899d;
  --outline: #2b2018;
  --cream: #fff6e6;
  --text-dim: rgba(255,246,230,0.72);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 800px 500px at 50% -5%, rgba(63,168,158,0.35), transparent 60%),
    linear-gradient(180deg, var(--teal-deep), #0a3735 60%, #082826);
  color: var(--cream);
  font-family: 'Nunito', system-ui, sans-serif;
}

a { color: inherit; }
.mono { font-family: 'JetBrains Mono', monospace; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* --- Nav --- */
nav.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 3px solid var(--outline);
  position: sticky;
  top: 0;
  background: var(--teal-deep);
  z-index: 50;
}
nav.site-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--gold);
  text-decoration: none;
}
nav.site-nav .logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--outline);
  background: var(--teal-mint);
}
nav.site-nav .links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 700;
}
nav.site-nav .links a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.15s;
}
nav.site-nav .links a:hover { color: var(--gold); }
nav.site-nav .links a.active { color: var(--gold); }
nav.site-nav .right { display: flex; align-items: center; gap: 12px; }
#authWidget { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
#authWidget .auth-name { color: var(--text-dim); }

/* --- Buttons (dicke Cartoon-Outline wie im Logo) --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  font-family: 'Baloo 2', sans-serif;
  border: 3px solid var(--outline);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 3px 0 var(--outline);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.btn-primary { background: var(--gold); color: #3a2400; }
.btn-primary:hover { background: #ffc74d; }
.btn-secondary { background: var(--teal-mint); color: #072a28; }
.btn-secondary:hover { background: #4fbcb1; }
.btn-discord { background: #94e0d8; color: #072a28; }
.btn-discord:hover { background: #aeeae4; }
.btn-sm { padding: 9px 18px; font-size: 13px; border-width: 2.5px; box-shadow: 0 2px 0 var(--outline); }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 60px 20px 50px;
}
.hero .mascot {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 4px solid var(--outline);
  background: var(--teal-mint);
  box-shadow: 0 6px 0 var(--outline);
  margin-bottom: 22px;
  animation: bob 3.5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero .mascot { animation: none; }
}

.ribbon {
  display: inline-block;
  background: var(--pink);
  color: #4a1220;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 7px 22px;
  border-radius: 999px;
  border: 2.5px solid var(--outline);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 50px;
  margin: 0 0 14px;
  color: var(--gold);
  -webkit-text-stroke: 2px var(--outline);
  text-shadow: 0 4px 0 var(--outline);
}

.hero p {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 30px;
  line-height: 1.6;
  font-weight: 600;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- Sections --- */
section { padding: 54px 20px; }
.section-head { margin-bottom: 8px; }
section h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  color: var(--gold);
}
section .section-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 30px;
  font-weight: 600;
}

/* --- Sticker-Karten (Signature-Element, passend zum Logo-Stil) --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  gap: 22px;
}
.tooltip-card {
  background: var(--teal-mint);
  border: 3.5px solid var(--outline);
  border-radius: 20px;
  padding: 0;
  text-decoration: none;
  color: #072a28;
  display: block;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--outline);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tooltip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 var(--outline);
}
.tooltip-card .quality-bar { display: none; }
.tooltip-card .card-body { padding: 22px 24px 24px; }
.tooltip-card .item-name {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #052624;
  margin: 0 0 6px;
}
.tooltip-card .item-quality-label {
  display: inline-block;
  background: var(--gold);
  color: #3a2400;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid var(--outline);
  margin-bottom: 14px;
}
.tooltip-card .item-desc {
  font-size: 14px;
  color: #0a3330;
  line-height: 1.6;
  margin: 0 0 16px;
  font-weight: 600;
}
.tooltip-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2.5px solid var(--outline);
  padding-top: 12px;
  font-size: 12px;
  font-weight: 700;
}
.tooltip-card .play-label {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  color: #052624;
}
.tooltip-card .free-tag { color: #0a3330; opacity: 0.75; }

/* --- Leaderboard --- */
.lb-preview {
  background: var(--teal);
  border: 3px solid var(--outline);
  border-radius: 16px;
  padding: 8px;
  max-width: 440px;
  box-shadow: 0 5px 0 var(--outline);
}
.lb-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
}
.lb-row:nth-child(odd) { background: rgba(255,255,255,0.06); }
.lb-row .rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--outline);
  color: #3a2400;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-row .name { font-weight: 800; letter-spacing: 0.2px; color: var(--cream); }
.lb-row .score {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  font-weight: 700;
  text-align: right;
}
.lb-row.me {
  background: rgba(240,180,41,0.18);
  border: 2px solid var(--gold);
}

/* --- Volle Bestenlisten-Seite --- */
.lb-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.lb-tab {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 2.5px solid var(--outline);
  background: var(--teal);
  color: var(--text-dim);
  cursor: pointer;
}
.lb-tab.active {
  background: var(--gold);
  color: #3a2400;
}
.lb-board {
  background: var(--teal);
  border: 3px solid var(--outline);
  border-radius: 16px;
  padding: 10px;
  max-width: 560px;
  box-shadow: 0 5px 0 var(--outline);
}
.lb-board .lb-row { grid-template-columns: 40px 1fr auto; }
.lb-count {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 14px;
}
.see-all-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 800;
  font-family: 'Baloo 2', sans-serif;
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
}
.see-all-link:hover { text-decoration: underline; }

.crown-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--outline);
  border-radius: 10px;
}
.crown-legend .legend-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--cream);
  width: 100%;
  margin-bottom: 2px;
}
.crown-legend .legend-item {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
}

/* --- News --- */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-entry {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  background: var(--teal);
  border: 2.5px solid var(--outline);
  border-radius: 14px;
  padding: 16px 18px;
}
.news-entry .date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  padding-top: 2px;
}
.news-entry h3 {
  font-family: 'Baloo 2', sans-serif;
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--cream);
}
.news-entry p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; font-weight: 600; }

/* --- Footer --- */
footer {
  border-top: 3px solid var(--outline);
  padding: 36px 20px 30px;
  text-align: center;
  background: var(--teal-deep);
}
footer .rune-divider { display: none; }
footer .footer-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
footer .copyright { color: var(--text-dim); font-size: 12px; font-weight: 700; }

/* --- Admin --- */
.admin-gate {
  max-width: 420px;
  margin: 60px auto;
  text-align: center;
  background: var(--teal);
  border: 3px solid var(--outline);
  border-radius: 16px;
  padding: 30px 24px;
  box-shadow: 0 5px 0 var(--outline);
}
.admin-gate p { color: var(--text-dim); font-weight: 600; margin-bottom: 18px; }

.admin-section {
  background: var(--teal);
  border: 3px solid var(--outline);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: 0 5px 0 var(--outline);
}
.admin-section h3 {
  font-family: 'Baloo 2', sans-serif;
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 18px;
}
.admin-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.admin-form input, .admin-form textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid var(--outline);
  background: var(--teal-deep);
  color: var(--cream);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
}
.admin-form textarea { min-height: 70px; resize: vertical; }
.admin-form label { font-size: 12px; font-weight: 700; color: var(--text-dim); }

.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.admin-row .flex1 { flex: 1; min-width: 140px; }
.admin-row input {
  padding: 7px 10px;
  border-radius: 6px;
  border: 2px solid var(--outline);
  background: var(--teal-deep);
  color: var(--cream);
  font-size: 13px;
  width: 100%;
}
.admin-row .score-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}
.btn-danger { background: #e35b5b; color: #3a0808; border-color: #7a1f1f; }
.btn-danger:hover { background: #f27676; }
