/* ==========================================================
   Landing-Page (module/landing) - oeffentliche Startseite fuer
   nicht angemeldete Besucher. Nur Layout/Scroll-Snap/Topbar/Dot-Nav
   ist hier neu - die Vorschau-Sektionen (Chat/Alert/EmoteWall/
   Commands/Poll/Raffle/Eventlist/Text/Goal/Countdown/Online) nutzen
   bewusst die echten Stylesheets der jeweiligen Module (siehe
   style/style.php $pageCSSMap['landing']).
   ========================================================== */

body.is-landing { margin: 0; background: var(--bg-page); overflow: hidden; }

#landingRoot { position: relative; height: 100svh; width: 100%; overflow: hidden; }

/* ---------- Topbar ---------- */
.lp-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 48px);
}
.lp-logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-family); font-size: clamp(16px, 2.4vw, 20px); font-weight: 800;
  color: var(--text-primary); text-decoration: none; letter-spacing: .3px;
}
/* .app-logo-badge/-text/-accent: siehe style/menu.css (global, auch auf
   der Landing-Page geladen) - hier nur die etwas groessere Badge-Groesse
   fuer den prominenteren Landing-Topbar-Logo-Auftritt. */
.lp-logo .app-logo-badge { width: 30px; height: 30px; border-radius: 8px; }
.lp-topbar-right { display: flex; align-items: center; gap: 12px; }
.lp-lang-switch select {
  background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 10px; font-size: 13px; font-family: var(--font-family);
  cursor: pointer;
}
.lp-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--button-bg); color: #fff; font-weight: 700;
  padding: 12px 22px; border-radius: var(--radius-md); text-decoration: none;
  font-size: 15px; transition: background .15s ease, transform .15s ease;
}
.lp-cta-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.lp-cta-btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Dot-Nav ---------- */
.lp-dotnav {
  position: fixed; right: clamp(8px, 2.5vw, 28px); top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; gap: 12px;
}
.lp-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: none; padding: 0; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.lp-dot:hover { background: rgba(255,255,255,.4); }
.lp-dot.active { background: var(--accent); transform: scale(1.35); }
@media (max-width: 640px) { .lp-dotnav { display: none; } }

/* ---------- Scroller / Pages ---------- */
#lpScroller {
  height: 100svh; overflow-y: auto; scroll-snap-type: y proximity; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
.lp-page {
  min-height: 100svh; width: 100%; box-sizing: border-box;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(70px, 12vh, 100px) clamp(16px, 6vw, 64px) clamp(50px, 8vh, 70px);
  position: relative;
  overflow-y: auto;
}
.lp-page:nth-child(odd)  { background: var(--bg-page); }
.lp-page:nth-child(even) { background: linear-gradient(180deg, var(--bg-page) 0%, #16151a 100%); }

.lp-section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(20px, 3.6vh, 36px); }
.lp-section-head h2 { font-size: clamp(22px, 3.4vw, 38px); color: var(--text-primary); margin: 0 0 10px; }
.lp-section-head p { color: var(--text-secondary); font-size: clamp(14px, 1.6vw, 16px); margin: 0; }

.lp-more-link {
  display: inline-block; margin-top: 18px; color: var(--accent); text-decoration: none; font-weight: 600;
  background: none; border: none; padding: 0; font-size: 15px; font-family: var(--font-family); cursor: pointer;
}
.lp-more-link:hover { color: var(--accent-hover); }
.lp-empty-hint { color: var(--text-muted); }

/* ---------- "Naechste Seite"-Kreisbutton: immer unten auf der Seite fixiert ---------- */
.lp-next-btn {
  position: absolute; left: 50%; bottom: clamp(14px, 2.6vh, 24px); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  animation: lpNextPulse 2.2s ease-in-out infinite;
}
.lp-next-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
@keyframes lpNextPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}
@media (prefers-reduced-motion: reduce) { .lp-next-btn { animation: none; transform: translateX(-50%); } }
@media (max-height: 560px) { .lp-next-btn { display: none; } }

/* ---------- "Mehr erfahren"-Modal (SweetAlert2) ---------- */
.lp-swal-icon { font-size: 44px; line-height: 1; margin-bottom: 6px; animation: lpSwalPop .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes lpSwalPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.lp-swal-title { font-size: 22px; font-weight: 800; color: var(--text-primary); margin: 0 0 8px; }
.lp-swal-desc { font-size: 14.5px; color: var(--text-secondary); margin: 0 0 18px; line-height: 1.5; }
.lp-swal-features { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lp-swal-features li {
  display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-secondary);
  opacity: 0; animation: lpSwalFeatureIn .4s ease forwards;
}
.lp-swal-features li svg { flex: none; margin-top: 2px; color: var(--success); }
@keyframes lpSwalFeatureIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.lp-swal-hint { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.lp-swal-pop-in { animation: lpSwalPopIn .35s cubic-bezier(.34,1.56,.64,1) both !important; }
@keyframes lpSwalPopIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lp-swal-icon, .lp-swal-features li, .lp-swal-pop-in { animation: none !important; opacity: 1 !important; }
}

/* ---------- Hero ---------- */
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 56px); align-items: center; max-width: var(--site-max-width); width: 100%; }
@media (max-width: 900px) { .lp-hero-grid { grid-template-columns: 1fr; } }
.lp-hero-inner { text-align: left; max-width: 620px; min-width: 0; }
@media (max-width: 900px) { .lp-hero-inner { text-align: center; max-width: 760px; margin: 0 auto; } }
.lp-hero-title { font-size: clamp(32px, 8vw, 84px); font-weight: 900; color: var(--text-primary); margin: 0 0 14px; letter-spacing: -1px; }
.lp-accent { color: var(--accent); }
.lp-hero-sub { font-size: clamp(14.5px, 2vw, 20px); color: var(--text-secondary); margin: 0 0 clamp(18px, 3vh, 32px); }
.lp-hero-cta { margin-bottom: clamp(24px, 4vh, 46px); }
.lp-hero-stats { display: flex; gap: clamp(20px, 6vw, 64px); justify-content: flex-start; flex-wrap: wrap; }
@media (max-width: 900px) { .lp-hero-stats { justify-content: center; } }
.lp-stat { display: flex; flex-direction: column; align-items: flex-start; }
@media (max-width: 900px) { .lp-stat { align-items: center; } }
.lp-stat-num { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--text-primary); font-family: var(--font-mono); }
.lp-stat-live { color: var(--live-color); }
.lp-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* ---------- Hero-Cluster: schwebende Vorschaukarten (1:1 aus dem Mock) ---------- */
.lp-cluster { position: relative; height: clamp(300px, 42vh, 460px); width: 100%; max-width: 460px; margin: 0 auto; }
.lp-float-card {
  position: absolute; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 20px 48px rgba(0,0,0,0.45);
  padding: clamp(10px, 1.6vw, 14px); animation: lpBob 6s ease-in-out infinite;
  width: min(258px, 46%); box-sizing: border-box; overflow: hidden;
}
@keyframes lpBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .lp-float-card { animation: none; } }

.lp-card-chat  { width: min(258px, 52%); top: 0; left: 4%; animation-delay: 0s; }
.lp-card-alert { width: min(210px, 44%); top: 6%; right: 0; animation-delay: 1.1s; }
.lp-card-goal  { width: min(236px, 50%); bottom: 6%; left: 0; animation-delay: 2.2s; }
.lp-card-countdown { width: min(190px, 40%); bottom: 0; right: 6%; animation-delay: .6s; }

.lp-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 6px; }
.lp-card-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-live-pill { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--live-color); font-family: var(--font-mono); letter-spacing: .04em; }
.lp-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live-color); animation: lpPulseDot 1.6s ease-out infinite; }
@keyframes lpPulseDot { 0% { box-shadow: 0 0 0 0 rgba(233,25,22,.55); } 70% { box-shadow: 0 0 0 7px rgba(233,25,22,0); } 100% { box-shadow: 0 0 0 0 rgba(233,25,22,0); } }

.lp-mini-chat { height: 100px; overflow: hidden; position: relative; font-family: var(--font-mono); font-size: 11.5px; }
.lp-mini-chat-track { display: flex; flex-direction: column; gap: 6px; animation: lpChatScroll 9s linear infinite; }
.lp-mini-chat-track div .lp-mc-user { font-weight: 700; }
@keyframes lpChatScroll { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
.u-violet { color: #b98bff; } .u-teal { color: #4dd6c4; } .u-amber { color: var(--warning); } .u-pink { color: #ff8bd0; }

.lp-mini-alert-avatar { width: 44px; height: 44px; border-radius: 50%; margin: 4px auto 8px; background: linear-gradient(135deg, var(--accent), #4dd6c4); }
.lp-mini-alert-title { text-align: center; font-weight: 800; font-size: 14px; color: var(--text-primary); }
.lp-mini-alert-sub { text-align: center; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }

.lp-mini-bar-track { height: 8px; border-radius: 99px; background: var(--bg-raised); overflow: hidden; margin-top: 6px; }
.lp-mini-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #c084fc); width: 22%; transition: width 1.6s ease; }
.lp-mini-goal-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11.5px; margin-top: 8px; color: var(--text-secondary); }

.lp-mini-countdown-num { font-family: var(--font-mono); font-weight: 700; font-size: clamp(18px, 3vw, 26px); color: var(--text-primary); text-align: center; font-variant-numeric: tabular-nums; }
.lp-mini-countdown-cap { text-align: center; font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Live / Community Grid Anpassungen (Klassen aus online.css) ----------
   online.css skopiert alle .on-*-Regeln auf #onlinePage (siehe dortiger
   Kopf-Kommentar), das gilt auf der Landingpage nicht - daher hier eine
   auf .lp-live skopierte Kopie der noetigen Regeln, sonst bleibt die
   "Live Streamer"-Seite komplett ungestylt. */
.lp-live .on-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  justify-content: center; gap: 22px;
}
.lp-live .on-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -12px rgba(0,0,0,.55);
  overflow: hidden; text-decoration: none; color: inherit; display: block;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease, border-color .22s ease;
}
.lp-live .on-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(145,70,255,.55), rgba(77,214,196,0) 55%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .22s ease; pointer-events: none;
}
.lp-live .on-card:hover {
  transform: translateY(-6px) scale(1.015); border-color: transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 30px 60px -14px rgba(145,70,255,.35), 0 18px 40px -12px rgba(0,0,0,.6);
}
.lp-live .on-card:hover::after { opacity: 1; }
.lp-live .on-thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-raised); overflow: hidden; }
.lp-live .on-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.5) 100%);
}
.lp-live .on-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.lp-live .on-card:hover .on-thumb img { transform: scale(1.06); }
.lp-live .on-thumb.thumbFailed img { display: none; }
.lp-live .on-live-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--live-color); color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 9px; border-radius: 99px; display: flex; align-items: center; gap: 5px;
  text-transform: uppercase; letter-spacing: .3px;
  box-shadow: 0 4px 14px rgba(233,25,22,.45);
}
.lp-live .on-live-badge::before {
  content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%;
  animation: lpPulseDot 1.6s ease-out infinite;
}
.lp-live .on-card-body { padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.lp-live .on-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px rgba(145,70,255,.35);
  transition: box-shadow .2s ease;
}
.lp-live .on-card:hover .on-avatar { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--accent); }
.lp-live .on-info { min-width: 0; }
.lp-live .on-name { font-weight: 700; font-size: 14.5px; color: var(--text-primary); margin-bottom: 2px; }
.lp-live .on-title {
  font-size: 12px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.lp-live .on-category { font-size: 12px; color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .lp-live .on-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .lp-live .on-card-body { padding: 11px 12px; gap: 8px; }
}
@media (max-width: 380px) {
  .lp-live .on-grid { grid-template-columns: minmax(0, 1fr); }
}

.lp-live-grid {
  max-width: var(--site-max-width); width: 100%;
  display: flex; justify-content: center;
}
.lp-avatar-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 900px; }
.lp-avatar-item { position: relative; display: block; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); transition: transform .15s ease, border-color .15s ease; }
.lp-avatar-item:hover { transform: translateY(-3px); border-color: var(--accent); }
.lp-avatar-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-avatar-live-dot { position: absolute; bottom: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--live-color); border: 2px solid var(--bg-page); }

/* ---------- Modul-Buendel-Karten (Modulpage 1/2/3) ---------- */
.lp-bundle-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 18px; max-width: var(--site-max-width); width: 100%;
}
.lp-bundle-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; min-width: 0; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.lp-bundle-card:hover, .lp-bundle-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.lp-bundle-card h3 { margin: 0 0 12px; font-size: 14.5px; color: var(--text-primary); }
.lp-bundle-card .lp-card-cta { margin-top: 12px; color: var(--accent); font-weight: 600; font-size: 13.5px; }

.lp-bundle-card .cu-stage,
.lp-bundle-card .au-stage,
.lp-bundle-card .ew-stage,
.lp-bundle-card .po-stage,
.lp-bundle-card .rf-stage,
.lp-bundle-card .el-stage,
.lp-bundle-card .tx-stage,
.lp-bundle-card .fg-stage,
.lp-bundle-card .cd-stage,
.lp-bundle-card .lp-cmd-stage {
  width: 100%; height: clamp(150px, 22vh, 210px);
}

.lp-alert-pop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; justify-content: center; height: 100%; }
.lp-alert-icon { font-size: clamp(28px, 4vw, 40px); }
.lp-alert-text { font-size: 14px; font-weight: 700; color: #fff; max-width: 280px; }

/* Commands: eigene, schlichte Vorschau (kein echtes Overlay im Modul,
   deshalb keine "echte" Animation zu uebernehmen - nur dezentes Reinfaden) */
.lp-cmd-stage { display: flex; flex-direction: column; justify-content: center; gap: 8px; background: #121215; border: 1px solid var(--border); border-radius: 8px; padding: 10px; overflow: hidden; }
.lp-cmd-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary);
  opacity: 0; animation: lpCmdIn .4s ease forwards;
}
.lp-cmd-row:nth-child(1) { animation-delay: .05s; }
.lp-cmd-row:nth-child(2) { animation-delay: .2s; }
.lp-cmd-row:nth-child(3) { animation-delay: .35s; }
.lp-cmd-row code { flex: none; background: var(--bg-raised); color: var(--accent); border-radius: 4px; padding: 2px 6px; font-family: var(--font-mono); font-size: 12px; }
.lp-cmd-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes lpCmdIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

/* Emote-Wand: schwebende Emojis - nutzt die echten ew-anim-* Keyframes
   aus style/emotewall.css, nur der Emoji-Container ist neu. */
.lp-ew-item { position: absolute; bottom: 6px; font-size: 22px; pointer-events: none; }

/* Poll: gleiche .po-pv-row/.po-pv-fill wie module/poll, nur der
   Kartenrahmen ist fuers Bundle etwas kompakter. */
.lp-bundle-card .po-preview-card { width: 100%; }

/* Text-Label: im echten Modul bewusst hellgrau (#c8c8c8) hinterlegt,
   damit dunkel umrandeter Text sichtbar bleibt - fuer die Landing-Page
   auf denselben dunklen Karo-Hintergrund wie Follower-Ziel/Countdown
   angeglichen, damit die drei Karten auf dieser Seite einheitlich wirken. */
.lp-bundle-card .tx-stage {
  background: repeating-conic-gradient(var(--bg-raised) 0% 25%, #16161a 0% 50%) 50% / 16px 16px;
  align-items: center; justify-content: center;
}
.lp-bundle-card .tx-previewtext { color: var(--text-primary); }

/* ---------- CTA / Outro ---------- */
.lp-cta-inner { text-align: center; max-width: 640px; }
.lp-cta-inner h2 { font-size: clamp(24px, 3.6vw, 40px); color: var(--text-primary); margin: 0 0 14px; }
.lp-cta-inner p { color: var(--text-secondary); margin: 0 0 26px; font-size: clamp(14px, 1.8vw, 16px); }
.lp-cta-legal { margin-top: clamp(24px, 5vh, 40px); font-size: 12px; }

/* ---------- Responsive Feinschliff ---------- */
@media (max-width: 640px) {
  .lp-bundle-grid { grid-template-columns: 1fr; }
  .lp-section-head { margin-bottom: 20px; }
}
@media (max-height: 700px) {
  .lp-page { justify-content: flex-start; padding-top: clamp(64px, 10vh, 90px); }
  .lp-cluster { height: clamp(260px, 34vh, 340px); }
}
