:root{
  --bg:#0b0f17;
  --panel:#121a27;
  --panel2:#0f1622;
  --text:#e8eefc;
  --muted:#9fb0d0;
  --border:rgba(255,255,255,.12);

  --accent:#6aa6ff;
  --accent2:#88ffcc;

  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius:18px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1100px 600px at 16% 0%, rgba(106,166,255,.22), transparent 60%),
    radial-gradient(900px 520px at 82% 6%, rgba(136,255,204,.16), transparent 55%),
    radial-gradient(900px 520px at 50% 110%, rgba(106,166,255,.10), transparent 60%),
    var(--bg);
  display:flex;
  flex-direction:column;
}

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

.container{
  flex:1;
  max-width:1150px;
  margin:0 auto;
  padding:22px 18px;
  width:100%;
}

.view{ display:none; }
.view.active{ display:block; }

.muted{ color:var(--muted); }
.small{ font-size:12px; }

/* ---------------------------
   TOPBAR (app-like)
--------------------------- */
.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 18px;
  border-bottom:1px solid rgba(255,255,255,.10);
  background:rgba(8,12,18,.55);
  backdrop-filter: blur(14px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius: 14px;
  transition: background .12s ease;
}
.brand:hover{ background: rgba(255,255,255,.04); text-decoration:none; }
.logo{ font-size:22px; }
.name{ font-weight:900; letter-spacing:.2px; }

.nav{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
  padding:6px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}

.nav-link{
  position:relative;
  padding:8px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: background .12s ease, color .12s ease;
  text-decoration:none;
}
.nav-link:hover{
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.nav-link.active{
  color: var(--text);
}
.nav-link.active::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:4px;
  height:2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(106,166,255,.9), rgba(136,255,204,.9));
}

/* ---------------------------
   BUTTONS
--------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:44px;
  padding:0 16px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  text-decoration:none;
}
.btn:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
  text-decoration:none;
}
.btn.primary{
  border-color: rgba(136,255,204,.40);
  background: linear-gradient(180deg, rgba(136,255,204,.22), rgba(136,255,204,.12));
  box-shadow: 0 18px 44px rgba(136,255,204,.12);
  color:#eafff5;
}
.btn.primary:hover{
  background: linear-gradient(180deg, rgba(136,255,204,.28), rgba(136,255,204,.14));
}
.btn.ghost{
  background: rgba(0,0,0,.10);
}
.btn-big{
  height:52px;
  padding:0 18px;
  border-radius: 16px;
  font-weight: 900;
}
.arrow{ opacity:.9; }

/* ---------------------------
   HERO
--------------------------- */
.hero{
  min-height: calc(100vh - 180px);
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  align-items:center;
}
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; min-height: unset; padding-top: 10px; }
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  color: var(--muted);
  width: fit-content;
}
.pill-dot{
  width:8px; height:8px;
  border-radius:999px;
  background: rgba(136,255,204,.85);
  box-shadow: 0 0 0 4px rgba(136,255,204,.10);
}

.hero-title{
  margin-top:12px;
  font-size: clamp(34px, 4.4vw, 54px);
  letter-spacing: .2px;
  line-height: 1.04;
}
.accent{
  background: linear-gradient(90deg, rgba(106,166,255,.95), rgba(136,255,204,.95));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}

.hero-sub{
  margin: 12px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.hero-ctas{
  margin-top: 18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.features{
  margin-top: 16px;
  display:grid;
  gap:10px;
  max-width: 560px;
}
.feature{
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}
.icon{
  width:40px;
  height:40px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
}

/* ---------------------------
   PREVIEW CARD + LIGHT ANIMATION
--------------------------- */
.hero-right{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height: 420px;
}

.preview-card{
  width: min(420px, 92vw);
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    rgba(15,22,34,.80);
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}

.preview-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 14px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.live{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(136,255,204,.28);
  background: rgba(136,255,204,.10);
}
.preview-title{ font-weight:900; }
.preview-meta{ color: var(--muted); font-size:12px; }

.preview-body{
  height: 240px;
  position:relative;
  background:
    radial-gradient(700px 260px at 50% 20%, rgba(106,166,255,.16), transparent 60%),
    rgba(0,0,0,.18);
}

/* Fake “drawing strokes” */
.stroke{
  position:absolute;
  height:6px;
  border-radius:999px;
  background: rgba(232,238,252,.75);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.s1{ left:50px; top:70px; width:250px; transform: rotate(-12deg); }
.s2{ left:90px; top:120px; width:210px; transform: rotate(18deg); opacity:.9; }
.s3{ left:70px; top:160px; width:270px; transform: rotate(6deg); opacity:.8; }

/* Light sweep animation (CSS-only) */
.shine{
  position:absolute;
  inset:-40%;
  background: linear-gradient(120deg,
    transparent 35%,
    rgba(255,255,255,.10) 45%,
    rgba(136,255,204,.12) 50%,
    rgba(255,255,255,.10) 55%,
    transparent 65%
  );
  transform: translateX(-35%) rotate(10deg);
  animation: shineSweep 3.2s ease-in-out infinite;
  pointer-events:none;
}
@keyframes shineSweep{
  0%   { transform: translateX(-55%) rotate(10deg); opacity:.0; }
  20%  { opacity:.55; }
  50%  { opacity:.85; }
  80%  { opacity:.45; }
  100% { transform: translateX(55%) rotate(10deg); opacity:.0; }
}

.preview-bottom{
  padding: 12px 14px 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.chip{
  font-size:13px;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
}
.muted-chip{ color: var(--muted); }

/* Orbs */
.orb{
  position:absolute;
  border-radius:999px;
  filter: blur(18px);
  opacity:.75;
  pointer-events:none;
}
.orb-a{
  width: 260px; height: 260px;
  left: 6%;
  top: 8%;
  background: rgba(106,166,255,.18);
}
.orb-b{
  width: 260px; height: 260px;
  right: 6%;
  bottom: 8%;
  background: rgba(136,255,204,.16);
}

/* ---------------------------
   FOOTER
--------------------------- */
.footer{
  max-width:1150px;
  margin:12px auto 18px;
  padding:0 18px;
  color:var(--muted);
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.sep{ opacity:.5; }

/* ---------------------------
   MODAL
--------------------------- */
body.modal-open{ overflow:hidden; }

.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:100;
}
.modal.open{ display:block; }

.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}

.modal-card{
  position:relative;
  width: min(560px, 92vw);
  margin: 10vh auto;
  border-radius: 20px;
  border:1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), rgba(15,22,34,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modal-head h2{ font-size:18px; }

.iconbtn{
  width:40px;
  height:40px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
}
.iconbtn:hover{ background: rgba(255,255,255,.07); }

.modal-body{
  padding: 14px;
}
.howlist{
  margin:0;
  padding-left: 18px;
  display:grid;
  gap:10px;
}
.modal-actions{
  display:flex;
  gap:10px;
  padding: 14px;
  border-top:1px solid rgba(255,255,255,.08);
  justify-content:flex-end;
  flex-wrap:wrap;
}

/* ===== Home hero spacing fix ===== */

/* Hero nicht künstlich in die Mitte drücken */
.hero{
  min-height: unset;            /* statt calc(100vh - 180px) */
  align-items: start;           /* statt center */
  padding-top: 18px;
  padding-bottom: 26px;
}

/* Auf großen Screens trotzdem nice, aber nicht “zu tief” */
@media (min-width: 1100px){
  .hero{
    padding-top: 26px;
  }
}

/* Preview rechts: etwas höher, optisch “auf einer Linie” */
.hero-right{
  min-height: 360px;            /* kleiner als vorher */
  align-items: flex-start;
  padding-top: 6px;
}

/* Preview-Card auf Home: oben nicht zu viel Abstand */
.preview-card{
  margin-top: 0;
}

/* Optional: Features-Boxen minimal kompakter */
.features{
  margin-top: 14px;
}
.feature{
  padding: 11px 12px;
}

/* ===== Home: Training-style preview inside hero ===== */

.preview-training .preview-body{
  position: relative;
  overflow: hidden;
}

.preview-body-training{
  background:
    radial-gradient(700px 260px at 50% 20%, rgba(106,166,255,.14), transparent 60%),
    rgba(0,0,0,.18);
}

.preview-glow{
  position:absolute; inset:-40px -60px auto auto;
  width:240px; height:240px;
  background: radial-gradient(circle at 30% 30%, rgba(106,166,255,.18), transparent 60%);
  transform: rotate(20deg);
  pointer-events:none;
}

.preview-svg{
  width:100%;
  height:100%;
  display:block;
  opacity:.95;
}

.strokePath{
  fill:none;
  stroke: rgba(232,238,252,.9);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 2.4s ease-in-out infinite;
}
.strokePath.p2{ stroke-width: 5; opacity:.7; animation-delay: .25s; }

@keyframes draw{
  0%   { stroke-dashoffset: 420; opacity:0; }
  10%  { opacity:1; }
  55%  { stroke-dashoffset: 0; }
  80%  { opacity:1; }
  100% { stroke-dashoffset: 0; opacity:0; }
}

.preview-flag{
  position:absolute; right:12px; bottom:12px;
  width:78px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  animation: pop 2.8s ease-in-out infinite;
}
.preview-flag img{ width:100%; display:block; }
@keyframes pop{
  0%,100%{ transform: translateY(0) scale(1); opacity:.92; }
  50%{ transform: translateY(-2px) scale(1.03); opacity:1; }
}
