/* Berufsdeutsch-Übung, Grundlagen + Startansicht. Nutzt die Farbvariablen der Seite (hell und dunkel). */
:root { --bd-flamme: #e0791f; --bd-gold: #c9962b; --bd-schatten: 0 6px 20px rgba(36, 71, 61, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bd-flamme: #f0a35a; --bd-gold: #e6c36a; --bd-schatten: 0 6px 20px rgba(0, 0, 0, .35); }
}
:root[data-theme="dark"] { --bd-flamme: #f0a35a; --bd-gold: #e6c36a; --bd-schatten: 0 6px 20px rgba(0, 0, 0, .35); }

#bd-spiel { max-width: 42rem; margin: 1.2rem 0; display: grid; gap: 1rem; }
#bd-spiel > * { margin: 0; }
#bd-spiel button { font: inherit; min-height: 44px; cursor: pointer; border-radius: 12px;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s; }
#bd-spiel button:not(:disabled):active { transform: scale(.97); }
#bd-spiel button:disabled { cursor: default; }
#bd-spiel button:focus-visible, .bd-karte:focus-visible { outline: 3px solid var(--bd-flamme); outline-offset: 2px; }
.bd-klein { font-size: .88rem; color: var(--grau); }
.bd-h { font-family: var(--serif); font-size: 1.35rem; margin: .6rem 0 0 !important; }
.bd-link { background: none; border: 0; color: var(--blau); text-decoration: underline; padding: .3rem .5rem; }
.bd-zurueck { justify-self: start; text-decoration: none; font-weight: 600; padding-left: 0; }

.bd-balken { width: 100%; height: .55rem; background: var(--linie); border-radius: 1rem; overflow: hidden; }
.bd-fuell { height: 100%; width: 0; border-radius: 1rem; background: linear-gradient(90deg, var(--gruen), #4fa77a);
  transition: width .5s cubic-bezier(.2, .8, .2, 1); }

/* Kopf: Rang mit XP-Balken */
.bd-held { display: flex; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; border-radius: 20px;
  background: linear-gradient(135deg, var(--blau) 0%, var(--gruen) 100%); color: var(--auf-akzent); box-shadow: var(--bd-schatten); }
.bd-symbol { flex: none; display: grid; place-items: center; width: 4.2rem; height: 4.2rem; font-size: 2.3rem;
  border-radius: 50%; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.bd-held-text { flex: 1; min-width: 0; }
.bd-held p, .bd-held h2 { margin: 0; color: inherit; }
.bd-ueber { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.bd-rangname { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; }
.bd-stufe { font-size: .9rem; opacity: .9; margin-bottom: .45rem !important; }
.bd-xpbalken { height: .7rem; background: rgba(255, 255, 255, .25); }
.bd-xpbalken .bd-fuell { background: linear-gradient(90deg, var(--bd-gold), #f3d98b); }
.bd-held-klein { font-size: .85rem; opacity: .9; margin-top: .35rem !important; }

/* Kennzahlen */
.bd-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.bd-zahl { display: grid; justify-items: center; gap: .1rem; padding: .8rem .4rem; text-align: center;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; box-shadow: var(--schatten); }
.bd-zahl strong { font-size: 1.3rem; line-height: 1.2; color: var(--tinte); }
.bd-zahl-icon { font-size: 1.5rem; }
.bd-zahl:first-child strong { color: var(--bd-flamme); }

/* Woche */
.bd-woche { padding: .8rem 1rem; background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; }
.bd-woche > p { margin: .5rem 0 0; text-align: center; }
.bd-tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.bd-tag { display: grid; justify-items: center; gap: .2rem; }
.bd-tag-punkt { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--linie); font-size: 1.05rem; }
.bd-tag-ja .bd-tag-punkt { background: var(--bd-flamme); border-color: var(--bd-flamme); box-shadow: 0 0 0 3px rgba(224, 121, 31, .2); }
.bd-tag-ja .bd-klein { color: var(--tinte); font-weight: 700; }
.bd-tag-bald .bd-tag-punkt { border-style: dashed; opacity: .55; }

/* Großer Startknopf */
.bd-cta { display: grid; gap: .15rem; justify-items: center; width: 100%; padding: 1rem 1.2rem; text-align: center;
  background: var(--bd-flamme); color: #1d1206; border: 0; border-bottom: 5px solid rgba(0, 0, 0, .22);
  font-weight: 700; font-size: 1.15rem; box-shadow: var(--bd-schatten); }
#bd-spiel .bd-cta { border-radius: 16px; }
.bd-cta strong { font-size: 1.25rem; }
.bd-cta span { font-weight: 500; font-size: .92rem; opacity: .85; }
.bd-cta:hover { filter: brightness(1.05); }
#bd-spiel .bd-cta:active { transform: translateY(3px); border-bottom-width: 2px; }
.bd-cta-fertig { background: var(--gruen-bg); color: var(--gruen); border-bottom-color: var(--gruen); box-shadow: none; }
.bd-cta-klein { display: block; width: auto; min-width: 9rem; margin-top: .8rem; padding: .6rem 1.4rem; font-size: 1.05rem; }

/* Modi und Lektionen */
.bd-modi { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; }
.bd-modus { display: grid; justify-items: start; gap: .2rem; padding: .9rem 1rem; text-align: left;
  background: var(--karte); color: var(--tinte); border: 1px solid var(--linie); box-shadow: var(--schatten); }
#bd-spiel .bd-modus { border-radius: 16px; }
.bd-modus:hover, .bd-lektion:hover { border-color: var(--blau); box-shadow: var(--bd-schatten); }
.bd-modus strong { font-size: 1.05rem; }
.bd-modus-icon { font-size: 1.7rem; line-height: 1; }
.bd-modus.bd-hat { background: var(--gruen-bg); border-color: var(--gruen); }
.bd-lektionen { display: grid; gap: .55rem; }
.bd-lektion { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; transition: border-color .15s, box-shadow .15s; }
.bd-lektion-nr { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--blau-bg); color: var(--blau); font-weight: 800; font-size: 1.1rem; }
.bd-hat .bd-lektion-nr { background: var(--bd-gold); color: #2a1d02; font-size: 1.3rem; }
.bd-lektion-mitte { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.bd-klein-knopf { flex: none; padding: .35rem 1rem; font-weight: 600; background: var(--blau-bg); color: var(--blau);
  border: 1px solid transparent; }
.bd-klein-knopf:hover { border-color: var(--blau); }
.bd-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; padding-top: .6rem; border-top: 1px solid var(--linie); }
.bd-fuss p { flex-basis: 100%; margin: .2rem 0 0; }

/* Ergebnis und Konfetti */
.bd-ergebnis { display: grid; gap: .7rem; justify-items: center; text-align: center; padding: 1.6rem 1.2rem;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 20px; box-shadow: var(--bd-schatten); }
.bd-ergebnis h2, .bd-ergebnis p { margin: 0; }
.bd-ergebnis .bd-zahlen { width: 100%; }
.bd-pokal { font-size: 4rem; line-height: 1; animation: bd-huepf .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.bd-ziel { font-size: 1.05rem; }
.bd-neu { font-size: 1.05rem; font-weight: 700; padding: .4rem .9rem; border-radius: 2rem;
  background: var(--gelb-blass); color: var(--tinte); border: 1px solid var(--bd-gold); }
.bd-rein { animation: bd-rein .35s cubic-bezier(.2, .8, .2, 1) both; }
.bd-konfetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.bd-konfetti span { position: absolute; top: -1rem; width: .55rem; height: .9rem; border-radius: 2px;
  animation: bd-fall 2.6s cubic-bezier(.3, .6, .6, 1) forwards; }
@keyframes bd-rein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bd-huepf { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bd-fall { to { top: 105%; transform: translateX(3rem) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) {
  #bd-spiel *, .bd-konfetti * { animation: none !important; transition: none !important; }
}
@media (max-width: 30rem) {
  .bd-held { padding: 1rem; gap: .8rem; }
  .bd-symbol { width: 3.4rem; height: 3.4rem; font-size: 1.9rem; }
  .bd-rangname { font-size: 1.35rem; }
  .bd-tag-punkt { width: 1.9rem; height: 1.9rem; }
  .bd-lektion { flex-wrap: wrap; }
  .bd-lektion .bd-klein-knopf { margin-left: auto; }
}
