/* ==========================================================================
   Cut Down Trees for Eggs – style.css  (mobile-first)
   ========================================================================== */

/* ---- Farben & Maße: hier zentral ändern ---- */
:root {
  --green: #1f7a3d;
  --green-dark: #14562b;
  --gold: #ffc72c;
  --gold-dark: #e0a200;
  --red: #d7263d;
  --red-dark: #a51628;
  --bg: #f4fbf3;
  --card: #ffffff;
  --text: #20301f;
  --muted: #5d6f5b;
  --soft: #e6f5e4;        /* hellgrüne Abschnitte */
  --title: var(--green-dark); /* Überschriften */
  --tile: #eef8ec;        /* heller Hintergrund hinter den Pet-Bildern (bleibt in beiden Modi hell) */
  --radius: 24px;
  --shadow: 0 6px 0 rgba(0, 0, 0, .10), 0 12px 24px rgba(0, 0, 0, .08);

  /* Seltenheiten */
  --r-common: #8d99a6;
  --r-uncommon: #3fb950;
  --r-rare: #2f80ed;
  --r-epic: #9b51e0;
  --r-legendary: #ffb300;
  --r-mythic: #e53935;
}

/* ---- Dunkler Modus: automatisch, wenn der Browser/das Betriebssystem dunkel eingestellt ist ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a12;
    --card: #1a2a1e;
    --text: #e6f1e4;
    --muted: #a5baa2;
    --soft: #142118;
    --title: #8fe3a6;
    --tile: #e8f3e6;
    --shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 12px 24px rgba(0, 0, 0, .45);
  }
  .nav { background: #14562b; }
  .hero { background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.12), transparent 40%), linear-gradient(180deg, #1c6e3a 0%, #14562b 55%, #0c3a1c 100%); }
  .section--xmas { background: linear-gradient(180deg, #8e1022 0%, #5f0a17 100%); }
  .section--community { background: #14562b; }
  .footer { background: #08150c; }
  .code { border-color: #b98a1a; }
  .btn--small { color: #fff; }
  .toast { color: var(--bg); }
  .gallery__item img, .pet__img img { filter: none; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5; font-size: 1.05rem;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---- Navigation ---- */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 14px; background: var(--green); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.15);
}
.nav__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.nav__links { display: none; gap: 18px; }
.nav__links a { text-decoration: none; font-weight: 500; padding: 8px 4px; }
.nav__links a:hover { color: var(--gold); }
.lang { display: flex; background: rgba(0,0,0,.2); border-radius: 999px; padding: 3px; }
.lang__btn {
  font: inherit; font-weight: 600; color: #fff; background: none; border: 0; border-radius: 999px;
  min-width: 48px; min-height: 40px; cursor: pointer;
}
.lang__btn[aria-pressed="true"] { background: var(--gold); color: #3b2a00; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer;
  border: 0; border-radius: 999px; padding: 14px 28px; min-height: 52px; color: #fff; background: var(--green);
  box-shadow: 0 5px 0 var(--green-dark); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--green-dark); }
.btn:disabled { background: #b9c2b8; box-shadow: 0 5px 0 #98a197; cursor: not-allowed; transform: none; }
.btn--play {
  font-size: 1.6rem; padding: 18px 44px; min-height: 64px; color: #3b2a00;
  background: var(--gold); box-shadow: 0 7px 0 var(--gold-dark); animation: pulse 2s ease-in-out infinite;
}
.btn--play:active { box-shadow: 0 1px 0 var(--gold-dark); }
.btn--small { padding: 10px 20px; min-height: 48px; background: var(--red); box-shadow: 0 4px 0 var(--red-dark); }
@keyframes pulse { 50% { transform: scale(1.05); } }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: 64px 18px 88px; min-height: 78vh; display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.25), transparent 40%),
    linear-gradient(180deg, #2aa14f 0%, #1f7a3d 55%, #14562b 100%);
}
.hero::after { /* Schneehügel unten */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -40px; height: 90px; background: var(--bg); border-radius: 50% 50% 0 0;
}
#snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4.6rem); text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.hero__sub { font-size: clamp(1.1rem, 3.5vw, 1.4rem); margin: 0 auto 28px; max-width: 34ch; }
.hero__note { margin-top: 18px; font-size: .95rem; opacity: .9; }
.badge { display: inline-block; background: var(--red); padding: 6px 16px; border-radius: 999px; font-weight: 600; margin: 0 0 14px; box-shadow: 0 3px 0 var(--red-dark); }

/* ---- Abschnitte ---- */
.section { padding: 56px 16px; max-width: 1100px; margin: 0 auto; }
.section--soft, .section--xmas, .section--community { max-width: none; }
.section--soft > *, .section--xmas > *, .section--community > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section--soft { background: var(--soft); }
.section__title { font-size: clamp(1.8rem, 6vw, 2.6rem); text-align: center; color: var(--title); }
.section__lead { text-align: center; color: var(--muted); max-width: 52ch; margin: 0 auto 28px !important; }

/* ---- Karten ---- */
.grid { display: grid; gap: 16px; margin-top: 24px; }
.grid--cards { grid-template-columns: 1fr; }
.grid--pets { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  border: 3px solid transparent; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-6px) rotate(-.5deg); border-color: var(--gold); }
.card__icon { font-size: 2.8rem; }
.card p { margin: 0; color: var(--muted); }

/* ---- Christmas ---- */
.section--xmas { background: linear-gradient(180deg, #b5172c 0%, #8e1022 100%); color: #fff; }
.section--xmas .section__title { color: #fff; }
.section--xmas .section__lead { color: #ffe3e6; }
.countdown { background: rgba(255,255,255,.14); border-radius: var(--radius); padding: 20px 12px; text-align: center; max-width: 560px !important; }
.countdown__label { margin: 0 0 10px; font-weight: 600; }
.countdown__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown__row > div { background: #fff; color: var(--red-dark); border-radius: 16px; padding: 10px 2px; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.countdown__row b { display: block; font-size: clamp(1.7rem, 8vw, 2.6rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown__row span { font-size: .85rem; color: var(--muted); }
.countdown__ended { font-weight: 700; font-size: 1.2rem; }
.xmas-list { list-style: none; padding: 0 !important; margin-top: 28px !important; display: grid; gap: 10px; grid-template-columns: 1fr; }
.xmas-list li { background: rgba(255,255,255,.12); border-radius: 18px; padding: 12px 16px; font-weight: 500; }
.xmas-list li span { font-size: 1.4rem; margin-right: 6px; }

/* ---- Galerie ---- */
.gallery { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 24px; }
.gallery__item { margin: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .3s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item { overflow: hidden; }
.gallery figcaption { padding: 10px 16px; font-weight: 500; }

/* ---- Pets ---- */
.rarity-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { color: #fff; padding: 4px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; background: var(--rc); }
.pet {
  --rc: var(--r-common); position: relative; text-align: center; background: var(--card); border-radius: var(--radius);
  padding: 18px 10px; border: 4px solid var(--rc); box-shadow: var(--shadow); transition: transform .2s;
}
.pet:hover { transform: translateY(-6px) scale(1.03); }
.pet__img { display: grid; place-items: center; aspect-ratio: 1; margin: -6px -2px 6px; border-radius: 18px; background: var(--tile); overflow: hidden; }
.pet__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; } /* der weiße Bildhintergrund verschwindet auf dem hellen Tile */
.pet__emoji { font-size: 3.6rem; }
.pet h3 { font-size: 1.1rem; margin: 8px 0 6px; }
.pet__rarity { display: inline-block; background: var(--rc); color: #fff; padding: 2px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pet__xmas { position: absolute; top: 6px; right: 10px; }
.pet__income { display: block; margin-top: 8px; font-weight: 600; color: var(--title); font-variant-numeric: tabular-nums; }
.nav__links a.is-active { color: var(--gold); }
.section--page { min-height: 70vh; }
.back { text-align: center; margin-top: 36px; }
.pet-count { text-align: center; font-weight: 600; color: var(--title); margin: 0 0 14px; }
/* Überschrift je Seltenheit über die ganze Breite */
.pet-group { grid-column: 1 / -1; margin: 18px 0 0; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.pet-group small { color: var(--muted); font-size: 1rem; font-weight: 500; }
.rarity-common { --rc: var(--r-common); } .rarity-uncommon { --rc: var(--r-uncommon); }
.rarity-rare { --rc: var(--r-rare); } .rarity-epic { --rc: var(--r-epic); }
.rarity-legendary { --rc: var(--r-legendary); } .rarity-mythic { --rc: var(--r-mythic); }
/* Secret: Regenbogen-Rahmen und -Badge */
.rarity-secret { --rc: #7c4dff; }
.chip.rarity-secret, .pet.rarity-secret .pet__rarity { background: linear-gradient(90deg, #ff4d4d, #ffb300, #3fb950, #2f80ed, #9b51e0); }
.pet.rarity-secret { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #ff4d4d, #ffb300, #3fb950, #2f80ed, #9b51e0) border-box; }

/* ---- Codes ---- */
.codes { display: grid; gap: 12px; max-width: 560px; margin: 0 auto; }
.code { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 20px; padding: 12px 12px 12px 20px; box-shadow: var(--shadow); border: 3px dashed var(--gold-dark); }
.code__text b { display: block; font-size: 1.3rem; letter-spacing: .04em; word-break: break-all; }
.code__text span { color: var(--muted); font-size: .95rem; }
.code--expired { opacity: .55; }

/* ---- FAQ ---- */
.faq { max-width: 760px; display: grid; gap: 10px; margin-top: 24px; }
.faq__item { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.faq__item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; min-height: 56px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "＋"; color: var(--red); font-size: 1.3rem; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* ---- Update-Log ---- */
.timeline { list-style: none; padding: 0; margin: 24px auto 0; max-width: 700px; border-left: 4px solid var(--gold); }
.timeline__item { position: relative; padding: 0 0 22px 22px; }
.timeline__item::before { content: ""; position: absolute; left: -12px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); border: 4px solid var(--bg); }
.timeline__item h3 { color: var(--title); }
.timeline__item ul { margin: 0; padding-left: 20px; color: var(--muted); }

/* ---- Community ---- */
.section--community { background: var(--green); color: #fff; }
.section--community .section__title { color: #fff; }
.community { display: grid; gap: 14px; margin-top: 24px; }
.community__card { display: flex; align-items: center; gap: 14px; background: var(--card); color: var(--text); border-radius: var(--radius); padding: 18px 22px; min-height: 72px; text-decoration: none; font-size: 1.2rem; box-shadow: var(--shadow); transition: transform .2s; }
.community__card:hover { transform: translateY(-4px) scale(1.02); }
.community__card span { font-size: 2rem; }

/* ---- Footer & Toast ---- */
.logo { border-radius: 12px; object-fit: cover; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.nav__brand .logo { border-radius: 10px; }
.footer { display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding: 28px 18px 40px; background: #0f3d1f; color: #cfe6d4; text-align: left; }
.footer__brand { flex: none; line-height: 0; }
.logo--footer { width: 72px; height: 72px; border-radius: 16px; transition: transform .2s; }
.footer__brand:hover .logo--footer { transform: rotate(-4deg) scale(1.06); }
.footer__text { flex: 1; }
.footer p { margin: 4px 0; }
.footer__small { font-size: .85rem; opacity: .75; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--text); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; transition: transform .3s; z-index: 100; }
.toast.show { transform: translate(-50%, 0); }

/* ---- Scroll-Animation ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn--play { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Größere Bildschirme ---- */
@media (min-width: 640px) {
  .grid--cards { grid-template-columns: repeat(2, 1fr); }
  .grid--pets { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .xmas-list { grid-template-columns: repeat(2, 1fr); }
  .community { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav { padding: 8px 32px; }
  .grid--cards { grid-template-columns: repeat(3, 1fr); }
  .grid--pets { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Dunkler Modus: Flächen, die weiter oben schon ihre helle Farbe bekommen haben (muss ganz unten stehen) ---- */
@media (prefers-color-scheme: dark) {
  .nav { background: #14562b; }
  .hero { background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.12), transparent 40%), linear-gradient(180deg, #1c6e3a 0%, #14562b 55%, #0c3a1c 100%); }
  .section--xmas { background: linear-gradient(180deg, #8e1022 0%, #5f0a17 100%); }
  .section--community { background: #14562b; }
  .footer { background: #08150c; }
  .code { border-color: #b98a1a; }
  .toast { color: var(--bg); }
}

/* ---- Linktree-Seite (/links) ---- */
body.linktree-page { min-height: 100vh; background: linear-gradient(180deg, #2aa14f 0%, #1f7a3d 55%, #14562b 100%) fixed; }
.lang--float { position: fixed; top: 12px; right: 12px; z-index: 60; background: rgba(0, 0, 0, .3); }
.linktree { position: relative; max-width: 520px; margin: 0 auto; padding: 64px 18px 40px; text-align: center; color: #fff; min-height: 100vh; }
.linktree #snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.linktree > *:not(#snow) { position: relative; z-index: 1; }
.linktree__logo { margin: 0 auto 14px; border-radius: 30px; border: 4px solid #fff; box-shadow: 0 8px 0 rgba(0, 0, 0, .18), 0 14px 30px rgba(0, 0, 0, .25); }
.linktree h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); text-shadow: 0 3px 0 rgba(0, 0, 0, .25); margin-bottom: .2em; }
.linktree__tagline { margin: 0; opacity: .92; }
.linktree__list { display: grid; gap: 14px; margin-top: 26px; }
.linktree__btn {
  display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 18px; border-radius: 22px; text-align: left; text-decoration: none;
  background: var(--card); color: var(--text); box-shadow: var(--shadow); transition: transform .15s;
}
.linktree__btn:hover { transform: translateY(-3px) scale(1.015); }
.linktree__btn:active { transform: translateY(2px); }
.linktree__icon { font-size: 1.9rem; flex: none; width: 2.2rem; text-align: center; }
.linktree__text b { display: block; font-size: 1.15rem; }
.linktree__text small { color: var(--muted); font-size: .92rem; }
.linktree__btn--primary { background: var(--gold); color: #3b2a00; box-shadow: 0 6px 0 var(--gold-dark), 0 12px 24px rgba(0, 0, 0, .2); min-height: 78px; }
.linktree__btn--primary .linktree__text small { color: #5a4300; }
.linktree__foot { margin-top: 30px; font-size: .85rem; opacity: .8; }

/* Links, die noch nicht eingetragen sind */
.is-soon { opacity: .55; cursor: not-allowed; }
.is-soon:hover { transform: none !important; }
.btn--play.is-soon { animation: none; }

@media (prefers-color-scheme: dark) {
  body.linktree-page { background: linear-gradient(180deg, #14562b 0%, #0f3d1f 55%, #08150c 100%) fixed; }
}

/* ---- Events-Seite (/events) ---- */
.events__msg { text-align: center; color: var(--muted); font-weight: 500; }
.events__group { font-size: 1.5rem; margin: 30px 0 6px; display: flex; align-items: center; gap: 10px; color: var(--title); max-width: 1100px; margin-left: auto; margin-right: auto; }
.events__group small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.events__group--live { color: var(--red); }
.events__grid { display: grid; gap: 18px; grid-template-columns: 1fr; max-width: 1100px; margin: 12px auto 0; }
.event { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 3px solid transparent; }
.event--live { border-color: var(--red); }
.event--past { opacity: .8; }
.event__img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2aa14f, #14562b); display: grid; place-items: center; overflow: hidden; }
.event__img img { width: 100%; height: 100%; object-fit: cover; }
.event__ph { font-size: 4rem; }
.event__chip { position: absolute; top: 10px; left: 10px; padding: 4px 14px; border-radius: 999px; color: #fff; font-weight: 600; font-size: .9rem; background: var(--green); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.event__chip--live { background: var(--red); animation: pulse 2s ease-in-out infinite; }
.event__chip--upcoming { background: #2f80ed; }
.event__chip--past { background: #6b7a69; }
.event__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event__body h3 { margin: 0; font-size: 1.25rem; }
.event__sub { margin: 0; color: var(--muted); font-weight: 500; }
.event__date { margin: 0; font-size: .95rem; }
.event__date small { color: var(--muted); }
.event__count { margin: 0; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.event__more summary { cursor: pointer; font-weight: 600; color: var(--title); min-height: 36px; display: flex; align-items: center; }
.event__more p { margin: 6px 0 0; white-space: pre-line; color: var(--muted); font-size: .95rem; }
.event .btn { margin-top: auto; align-self: flex-start; }
@media (min-width: 640px) { .events__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .events__grid { grid-template-columns: repeat(3, 1fr); } }
