/* Glückstempel — gemeinsame Styles */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F9F6EF;
  --bg-card: #FFFFFF;
  --ink: #1a1a1a;
  --ink-soft: #555;
  --accent: #E2B93B;
  --accent-soft: #FAF3D4;
  --border: #E4DFD0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(40, 35, 20, 0.08);
  --color-gemeinschaft: #E8806A;
  --color-gesundheit:   #7CB342;
  --color-geld:         #E2B93B;
  --color-zeit:         #5C8FB8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page--wide {
  max-width: 100%;
  padding: 16px 24px;
}

h1, h2, h3 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }

p { line-height: 1.6; color: var(--ink-soft); }

.hint {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 32px;
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: none;
  background: var(--ink);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}
.btn:hover { background: #333; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: white; }

.btn--accent {
  background: var(--accent);
  color: var(--ink);
}
.btn--accent:hover { background: #c89f2d; }

.btn--danger {
  background: #C85450;
  color: white;
}
.btn--danger:hover { background: #a83b38; }

.btn--small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

/* ---------- Inputs ---------- */
input[type="text"] {
  font-family: inherit;
  font-size: 1.1rem;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  width: 100%;
  transition: border-color 0.2s;
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- Tempel SVG ---------- */
.temple-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.temple-svg { width: 100%; height: auto; max-height: 100%; display: block; }
.temple-text-script { font-family: 'Caveat', cursive; font-weight: 700; fill: #1a1a1a; }
.temple-score {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  fill: #1a1a1a;
}

/* ---------- Slider (Voting) ---------- */
.slider-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 6px solid var(--cat-color, var(--accent));
}

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.slider-title {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  font-weight: 700;
}
.slider-value {
  font-weight: 700;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  color: var(--cat-color, var(--ink));
  min-width: 2ch;
  text-align: right;
}
.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--cat-color) 0%,
    var(--cat-color) calc(var(--pct, 0) * 1%),
    #E4DFD0 calc(var(--pct, 0) * 1%),
    #E4DFD0 100%);
  outline: none;
  cursor: pointer;
}
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cat-color, var(--ink));
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: grab;
}
.slider-input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cat-color, var(--ink));
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: grab;
}
.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 4px;
  padding: 0 2px;
}

/* ---------- Layout: Präsentationsseite ---------- */
.present-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - 32px);
}
.present-main { min-width: 0; }
.present-side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1000px) {
  .present-grid { grid-template-columns: 1fr; }
}

.room-code {
  font-family: 'Caveat', cursive;
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 18px;
  border: 2px dashed var(--accent);
  line-height: 1;
}

.qr-wrap {
  background: white;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.stats-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.stat-num {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.stat-lbl {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Voting-Seite (Teilnehmer) ---------- */
.vote-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
}
.vote-header {
  text-align: center;
  margin-bottom: 24px;
}
.vote-header .room-code-mini {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 3px;
}
.temple-preview {
  margin: 16px 0 24px;
  max-height: 320px;
}

/* ---------- Success-Zustand ---------- */
.done-state {
  text-align: center;
  padding: 40px 20px;
}
.done-state .checkmark {
  font-size: 4rem;
  color: var(--color-gesundheit);
  margin-bottom: 12px;
}

/* ---------- Landing ---------- */
.landing {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
}
.landing .hero {
  max-width: 300px;
  margin: 0 auto 24px;
}
.landing .code-input {
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  letter-spacing: 8px;
  text-transform: uppercase;
}

/* ---------- Banner / Fehler ---------- */
.banner {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.banner--warn {
  background: #FFF4D1;
  border: 1px solid #E2B93B;
  color: #6B5200;
}
.banner--error {
  background: #FDEDEC;
  border: 1px solid #C85450;
  color: #7A2421;
}
.banner--info {
  background: #E8F0F7;
  border: 1px solid #5C8FB8;
  color: #2C5270;
}

a { color: var(--ink); }
