/* =========================================================================
   DATE PLANNER · BASE / SHARED COMPONENT LAYER
   -------------------------------------------------------------------------
   Duolingo-inspirierte Komponentensprache, romantisch interpretiert.
   Alle Farben/Schriften kommen aus CSS-Variablen -> werden pro Theme
   in css/theme-*.css überschrieben.
   ========================================================================= */

/* ----- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-rounded);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* hidden-Attribut zuverlässig durchsetzen (schlägt display von .field/.chip/.tabpane) */
[hidden] { display: none !important; }

/* ----- Default Theme-Tokens (werden von Theme-Dateien überschrieben) --- */
:root {
  --font-rounded: 'Nunito', system-ui, sans-serif;
  --font-display: 'Fredoka', 'Nunito', sans-serif;
  --font-script: 'Nunito', sans-serif;

  --bg: #fff7f4;
  --surface: #ffffff;
  --surface-2: #fff1ed;
  --ink: #3a2b32;
  --ink-soft: #8a7a80;

  --primary: #ff6f91;
  --primary-shadow: #e0476b;
  --primary-soft: #ffe3ea;

  --secondary: #ffb86b;
  --secondary-shadow: #e2954a;

  --accent: #c9a14a;
  --success: #5ec98a;
  --success-shadow: #44a86d;

  --border: #f0dcd9;
  --ring: #ffd7e0;
  --shadow-card: 0 10px 30px rgba(190, 90, 110, .12);

  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1080px;
}

/* ----- Layout ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 56px; }
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }

/* dekorativer, soft-romantischer Hintergrund-Verlauf */
.bg-soft { background:
  radial-gradient(1200px 500px at 80% -10%, var(--primary-soft), transparent 60%),
  radial-gradient(900px 500px at -10% 10%, var(--surface-2), transparent 55%),
  var(--bg);
}

/* ----- Typografie ------------------------------------------------------ */
.display { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -.5px; }
.heading-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -1px; }
.heading-lg { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; color: var(--primary); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 56ch; }
.script { font-family: var(--font-script); }

/* ----- Topbar ---------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.brand .dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-shadow); }
.topbar .spacer { flex: 1; }

/* ----- Chips (Streak / XP / Herzen) ------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: .95rem;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--border);
}
.chip--love  { color: var(--primary); }
.chip--gold  { color: var(--accent); }
.chip .ico { font-size: 1.05rem; }

/* ----- Buttons (Signature 3D-Press) ------------------------------------ */
.btn {
  --bs: var(--primary-shadow);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; font-size: .95rem;
  color: #fff; background: var(--primary);
  border: none; border-radius: 16px;
  padding: 15px 26px;
  box-shadow: 0 5px 0 0 var(--bs);
  transition: transform .06s ease, box-shadow .06s ease, filter .15s ease;
  user-select: none;
}
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 0 var(--bs); }
.btn--secondary { background: var(--secondary); --bs: var(--secondary-shadow); }
.btn--success { background: var(--success); --bs: var(--success-shadow); }
.btn--ghost {
  background: var(--surface); color: var(--primary);
  border: 2px solid var(--border); box-shadow: 0 4px 0 0 var(--border);
  --bs: var(--border);
}
.btn--lg { padding: 18px 34px; font-size: 1.05rem; border-radius: 18px; }
.btn--block { display: flex; width: 100%; }

/* ----- Karten ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 22px;
}
.card--pad-lg { padding: 30px; }
.card--soft { box-shadow: var(--shadow-card); border-color: transparent; }

/* Auswahl-Karten (das eigentliche "Date wählen") */
.option {
  display: flex; align-items: center; gap: 16px;
  width: 100%; text-align: left;
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.option:hover { transform: translateY(-2px); border-color: var(--ring); }
.option:active { transform: translateY(0); }
.option.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.option__emoji {
  flex: none; width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.7rem;
  background: var(--surface-2);
}
.option__body { flex: 1; }
.option__title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.option__desc { color: var(--ink-soft); font-size: .92rem; }
.option__check {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); display: grid; place-items: center;
  color: #fff; font-size: .9rem;
}
.option.is-selected .option__check { background: var(--primary); border-color: var(--primary); }
.option:not(.is-selected) .option__check span { opacity: 0; }

/* ----- Figuren / Avatare (Platzhalter -> später echte Fotos) ----------- */
.avatar { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar__img {
  width: 96px; height: 96px; border-radius: 50%;
  border: 5px solid var(--surface);
  outline: 4px solid var(--ring);
  background: linear-gradient(160deg, var(--primary-soft), var(--surface-2));
  overflow: hidden; display: grid; place-items: center;
  box-shadow: var(--shadow-card);
}
.avatar__img img, .avatar__img svg { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg .avatar__img { width: 132px; height: 132px; }
.avatar--sm .avatar__img { width: 64px; height: 64px; border-width: 4px; outline-width: 3px; }
.avatar__label {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: 3px 14px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--border);
}

/* ----- Sprechblase ----------------------------------------------------- */
.speech {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700; color: var(--ink);
  max-width: 320px;
}
.speech::after {
  content: ""; position: absolute; left: -10px; top: 24px;
  width: 18px; height: 18px; background: var(--surface);
  border-left: 2px solid var(--border); border-bottom: 2px solid var(--border);
  transform: rotate(45deg);
}
.speech--right::after { left: auto; right: -10px; transform: rotate(225deg); }

/* ----- Lernpfad / Date-Pfad (Duolingo-Path) ---------------------------- */
.path { display: flex; flex-direction: column; align-items: center; gap: 26px; padding-block: 10px; position: relative; }
.path__node {
  position: relative;
  width: 78px; height: 70px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.8rem;
  background: var(--primary); color: #fff;
  box-shadow: 0 7px 0 0 var(--primary-shadow);
  border: none;
}
.path__node[data-off="l"] { transform: translateX(-70px); }
.path__node[data-off="r"] { transform: translateX(70px); }
.path__node--done { background: var(--success); box-shadow: 0 7px 0 0 var(--success-shadow); }
.path__node--locked { background: #e7dad7; color: #b6a6a3; box-shadow: 0 7px 0 0 #d6c6c3; }
.path__node--active::before {
  content: "START"; position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 600; font-size: .7rem; letter-spacing: 1px;
  color: var(--primary); background: var(--surface);
  border: 2px solid var(--border); padding: 3px 10px; border-radius: 999px;
  animation: bob 1.1s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }

/* ----- Fortschrittsbalken ---------------------------------------------- */
.progress { height: 16px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 2px solid var(--border); }
.progress__bar { height: 100%; background: var(--primary); border-radius: 999px; position: relative; }
.progress__bar::after { content: ""; position: absolute; inset: 3px 6px auto 6px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.45); }

/* ----- Hilfsgitter ----------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* Dekoherzen */
.hearts { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.hearts span { position: absolute; font-size: 1.4rem; opacity: .25; animation: float 9s linear infinite; }
@keyframes float { 0% { transform: translateY(20px); opacity: 0; } 15% { opacity: .25; } 100% { transform: translateY(-110vh); opacity: 0; } }

@media (max-width: 760px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .path__node[data-off="l"], .path__node[data-off="r"] { transform: none; }
}
