@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Cinzel+Decorative:wght@700&family=EB+Garamond:ital@0;1&family=Caveat:wght@500;700&display=swap');

:root {
  --holz-dunkel: #1c130d;
  --stein: #4a4740;
  --gold: #c9a227;
  --gold-hell: #f0d27a;
  --gold-dunkel: #8a6a1a;
  --pergament: #e8dcc0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  color: var(--pergament);
  display: flex;
  flex-direction: column;
  align-items: center;

  background-color: var(--holz-dunkel);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 75%),
    url('/bilder/textur-holz.png');
  background-size: auto, 512px;
  background-repeat: no-repeat, repeat;
  background-attachment: fixed;
}

/* Kopfmenü, auf allen Seiten nach dem Login (nicht auf index.html) */
.kopfmenue {
  width: min(720px, 92vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 1.6rem auto 0;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201,162,39,0.3);
}

.kopfmenue-logo {
  font-family: 'Cinzel', serif;
  color: var(--gold-hell);
  text-decoration: none;
  letter-spacing: 1px;
  font-size: 1.05rem;
  white-space: nowrap;
}

.kopfmenue-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.kopfmenue-links a {
  color: var(--pergament);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.kopfmenue-links a:hover,
.kopfmenue-links a.aktiv {
  opacity: 1;
  color: var(--gold-hell);
}

/* Zentrales Wappen der Akademie oberhalb des Panels (bilder/wappen-akademie.png) */
.wappen {
  display: block;
  width: min(220px, 60vw);
  height: auto;
  margin: 6vh auto 0;
  filter: drop-shadow(0 0 18px rgba(201,162,39,0.35));
}

.wappen-brunnenzunft {
  filter: drop-shadow(0 0 18px rgba(169,184,194,0.4));
}

.rahmen {
  position: relative;
  width: min(720px, 92vw);
  margin: 2rem auto 6vh;
  padding: 2.8rem 2.5rem;
  background: rgba(10,7,4,0.55);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(201,162,39,0.5);
  border-radius: 2px;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.2), 0 25px 50px rgba(0,0,0,0.55);
  text-align: center;
}

/* Zierecken, wie sie geschnitzte Holzrahmen typischerweise haben */
.rahmen::before,
.rahmen::after {
  content: '❖';
  position: absolute;
  color: var(--gold);
  font-size: 1rem;
  opacity: 0.8;
}
.rahmen::before { top: 0.6rem; left: 0.8rem; }
.rahmen::after { top: 0.6rem; right: 0.8rem; }

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  background: linear-gradient(180deg, var(--gold-hell), var(--gold-dunkel));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.6rem;
}

h1 { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-size: clamp(1.8rem, 5vw, 2.6rem); }

/* Zierlinie zwischen Titel und Inhalt, angelehnt an den "---"-Trenner der Vorlage */
.zierlinie {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0 2rem;
  color: var(--gold-dunkel);
}
.zierlinie::before,
.zierlinie::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dunkel), transparent);
}

/* in Stein gekratzter Zierschriftzug anstelle des Akademie-Logos */
.steinschrift {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 6px;
  color: #a19c8f;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('/bilder/textur-stein.png');
  background-size: cover;
  background-position: center;
  padding: 1.2rem 1rem;
  border-radius: 3px;
  text-shadow:
    1px 1px 0 rgba(0,0,0,0.75),
    -1px -1px 0 rgba(255,255,255,0.08);
  user-select: none;
}

/* Einzelne Rune: auf Klick taucht kurz der echte Buchstabe auf, wie aus
   einem Brunnen gezogen, und sinkt danach wieder unter die Oberfläche */
.rune {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.rune::after {
  content: attr(data-buchstabe);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fc9dc;
  text-shadow: 0 0 10px rgba(143,201,220,0.9);
  opacity: 0;
  transform: translateY(40%);
  transition: transform 0.45s cubic-bezier(0.2,0.8,0.3,1), opacity 0.45s ease;
  pointer-events: none;
}

.rune.aufgetaucht {
  opacity: 0.2;
  transition: opacity 0.45s ease;
}

.rune.aufgetaucht::after {
  opacity: 1;
  transform: translateY(0);
}

/* Versteckte Brunnenzunft-Lore-Seite: kühles Silber statt Gold, wie das
   Rivalen-Wappen – man ist hier bewusst "im Feindesland" */
.brunnenzunft-seite {
  border-color: rgba(169,184,194,0.5);
}
.brunnenzunft-seite h2 {
  background: linear-gradient(180deg, #d7e4ea, #8b9aa3);
  -webkit-background-clip: text;
  background-clip: text;
}
.brunnenzunft-seite .zierlinie { color: #6c7d87; }
.brunnenzunft-seite a { color: #a9b8c2; }
.brunnenzunft-seite p:not(.hinweis) { text-align: left; }

/* Halbversteckter Link: sieht wie normaler Text aus, verrät sich nur
   durch die gepunktete Linie und richtig erst beim Hovern */
.versteckter-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(169,184,194,0.6);
  cursor: pointer;
}
.versteckter-link:hover {
  color: #a9b8c2;
  border-bottom-style: solid;
}

/* Symbol-Links auf der Schacht-Seite (Eimer/Seil/Wasser -> je eine Lehre) */
/* Schacht-Illustration mit unsichtbaren Klick-Bereichen auf Eimer, Seil
   und Tür, die zu den jeweiligen Lehren führen. Positionen sind an
   bilder/schacht.png (896x1200) angepasst, in Prozent, damit sie beim
   Skalieren mitwandern. */
.schacht-bild-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.schacht-bild-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.schacht-hotspot {
  position: absolute;
  border-radius: 6px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.schacht-hotspot:hover {
  background: rgba(169,184,194,0.14);
  box-shadow: 0 0 18px 6px rgba(169,184,194,0.3);
}

.hotspot-eimer  { left: 30%; top: 60%; width: 14%; height: 17%; }
.hotspot-seil   { left: 17%; top: 0%;  width: 24%; height: 58%; }
.hotspot-klappe { left: 52%; top: 14%; width: 19%; height: 24%; }
.hotspot-wappen { left: 76%; top: 14%; width: 20%; height: 26%; }

p.hinweis { color: var(--pergament); opacity: 0.85; }

.rivalenspruch {
  font-family: 'Cinzel', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #a9b8c2; /* kühles Silber statt Gold – signalisiert fremde Fraktion */
  border-left: 2px solid #5c6d78;
  padding-left: 0.8rem;
  margin: 0 auto 1.5rem;
  max-width: 26rem;
  text-align: left;
  opacity: 0.85;
}

.rivalenspruch cite {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.2rem;
}

.rivalenspruch-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1.5rem;
  max-width: 30rem;
}

.rivalenwappen {
  width: 4.5rem;
  height: auto;
  flex-shrink: 0;
}

.rivalenspruch-block .rivalenspruch {
  margin: 0;
}

form.passwort-formular {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

input[type="password"] {
  width: 60%;
  padding: 0.6rem 0.8rem;
  font-size: 1.1rem;
  font-family: 'EB Garamond', serif;
  background: var(--pergament);
  border: 1px solid var(--gold);
  border-radius: 3px;
  text-align: center;
}

button {
  padding: 0.65rem 1.8rem;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, var(--gold-hell), var(--gold-dunkel));
  color: var(--holz-dunkel);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.5);
}

button:disabled { opacity: 0.7; cursor: default; transform: none; }

.fehler {
  color: #e07a5f;
  font-weight: bold;
}

/* Wartesymbol beim Absenden der Parole, angelehnt an den Lade-Spinner der Vorlage */
.spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0 auto;
  border: 2px solid rgba(232,220,192,0.35);
  border-top-color: var(--gold-hell);
  border-radius: 50%;
  animation: drehen 0.7s linear infinite;
}
.spinner.sichtbar { display: block; }

@keyframes drehen { to { transform: rotate(360deg); } }

/* Kachel-Navigation im Hauptmenü, angelehnt an die Icon-Links der Vorlage */
nav.hauptmenue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.6rem 1rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: 3px;
  color: var(--pergament);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.kachel:hover {
  transform: translateY(-3px);
  border-color: var(--gold-hell);
  background: rgba(201,162,39,0.12);
}

/* Icon-Bilder bringen ihren Rahmen (Holzmedaillon + Goldring) schon mit */
.kachel .kachel-symbol {
  display: flex;
}

.kachel .kachel-symbol img {
  width: 3.4rem;
  height: 3.4rem;
}

footer {
  margin-top: auto;
  padding: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

footer a { color: var(--pergament); }
footer a:hover { color: var(--gold-hell); }

/* Impressum/Datenschutz: Fließtext liest sich linksbündig besser */
.rechtlich { text-align: left; }
.rechtlich h2 { text-align: center; }

.platzhalter-hinweis {
  color: #e0a94a;
  border: 1px dashed #e0a94a;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
}

/* Reiner CSS-"Checkbox-Hack": versteckte Checkbox schaltet per :checked
   den echten Impressums-Inhalt frei, kein JS nötig */
.ot-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ot-inhalt { display: none; }
.ot-checkbox:checked ~ .ot-inhalt { display: block; }
.ot-checkbox:checked ~ .ot-warnung { display: none; }

.ot-warnung {
  display: block;
  cursor: pointer;
  text-align: center;
  border: 1px dashed #e0a94a;
  color: #e0a94a;
  padding: 1.2rem 1.5rem;
  font-family: 'Cinzel', serif;
  line-height: 1.6;
}

.ot-ja-knopf {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.5rem 1.4rem;
  background: linear-gradient(180deg, var(--gold-hell), var(--gold-dunkel));
  color: var(--holz-dunkel);
  border-radius: 3px;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* Ertüchtigungen: Symbolauswahl */
.symbol-auswahl {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

/* Symbol-Bilder bringen ihren eigenen Rahmen (Holzmedaillon + Goldring)
   schon mit, der Button selbst braucht keinen eigenen mehr */
.symbol-auswahl button {
  background: none;
  border: none;
  padding: 0.2rem;
  box-shadow: none;
  border-radius: 50%;
}

.symbol-auswahl button img {
  display: block;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
}

.symbol-auswahl button.aktiv img {
  box-shadow: 0 0 0 3px var(--gold), 0 0 12px rgba(201,162,39,0.6);
}

.spielfeld {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
}

.reel-spalte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.reel-label {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reel-rahmen {
  width: 90px;
  height: 90px;
  overflow: hidden;
  border: 3px solid var(--gold);
  border-radius: 4px;
  background: rgba(0,0,0,0.4);
}

/* An- und abschwellendes Leuchten für die Walze der Gewinnerseite bzw.
   beide Walzen beim echten Remis (Brunnen gegen Brunnen) */
@keyframes leuchten-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,0); }
  50% { box-shadow: 0 0 20px 6px rgba(201,162,39,0.85); }
}
@keyframes leuchten-silber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(169,184,194,0); }
  50% { box-shadow: 0 0 20px 6px rgba(169,184,194,0.75); }
}
.reel-rahmen.sieg { animation: leuchten-gold 1.4s ease-in-out infinite; }
.reel-rahmen.remis { animation: leuchten-silber 1.4s ease-in-out infinite; }

/* Einmaliges Erlöschen, für den Papier-Sonderfall: das Leuchten des
   scheinbaren Gewinners stirbt aus, statt einfach abzubrechen */
@keyframes leuchten-erstirbt {
  0% { box-shadow: 0 0 20px 6px rgba(201,162,39,0.85); }
  100% { box-shadow: 0 0 0 0 rgba(201,162,39,0); }
}
.reel-rahmen.erstirbt { animation: leuchten-erstirbt 0.9s ease-out forwards; }

/* Ergebnistext wird "weggespült" (Wasser-Anmutung: bläulich, verschwommen)
   und der nächste Text spült wieder ein – nur für den Papier-Sonderfall */
@keyframes text-wegspuelen {
  0% { opacity: 1; filter: blur(0); color: var(--gold-hell); text-shadow: none; }
  60% { opacity: 0.5; filter: blur(3px); color: #8fc9dc; text-shadow: 0 0 14px rgba(143,201,220,0.9); }
  100% { opacity: 0; filter: blur(4px); color: #8fc9dc; }
}
@keyframes text-einspuelen {
  0% { opacity: 0; filter: blur(4px); color: #8fc9dc; text-shadow: 0 0 14px rgba(143,201,220,0.9); }
  100% { opacity: 1; filter: blur(0); color: var(--gold-hell); text-shadow: none; }
}
#ergebnis.wegspuelen { animation: text-wegspuelen 0.7s ease-in forwards; }
#ergebnis.einspuelen { animation: text-einspuelen 0.7s ease-out forwards; }

.symbol-feld-liste {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
}

.symbol-feld {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.symbol-feld img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.vs { font-family: 'Cinzel', serif; font-size: 1.5rem; color: var(--gold); }

#ergebnis {
  min-height: 1.6rem;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--gold-hell);
}

/* Merkzettel */
.notiz-icon {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 3rem;
  height: 3rem;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--pergament);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
}

.notiz-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.notiz-icon:hover { background: rgba(201,162,39,0.25); transform: none; }

.notiz-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 20;
  align-items: center;
  justify-content: center;
}

.notiz-overlay.sichtbar { display: flex; }

.notiz-zettel {
  position: relative;
  width: min(320px, 80vw);
  padding: 2rem 2.5rem;
  background: #efe6d0;
  color: #2b2417;
  font-family: 'Caveat', cursive;
  font-size: 1.7rem;
  border-radius: 2px;
  transform: rotate(-1.5deg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.notiz-zettel ul { list-style: none; margin: 0; padding: 0; text-align: left; }

.notiz-zettel li {
  padding: 0.15rem 0;
  border-bottom: 1px dashed rgba(0,0,0,0.2);
}

.notiz-zettel li.durchgestrichen {
  text-decoration: line-through;
  opacity: 0.6;
}

.notiz-schliessen {
  position: absolute;
  top: 0.2rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  font-family: 'EB Garamond', serif;
  color: #2b2417;
  cursor: pointer;
  box-shadow: none;
}

/* Veranstaltungen */
ul.veranstaltungen { list-style: none; padding: 0; text-align: left; }

ul.veranstaltungen li {
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
  border-left: 3px solid var(--stein);
  background: rgba(0,0,0,0.25);
}

ul.veranstaltungen li.zukunft { border-left-color: var(--gold); }

.datum { display: block; font-size: 0.9rem; opacity: 0.8; }

.badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 3px;
  background: var(--gold);
  color: var(--holz-dunkel);
  font-weight: bold;
}
