/* Branding = markgerngross.com (assets/css/main.css): Schwarz/Gold, Playfair Display + DM Sans */
@font-face { font-family: 'Playfair Display'; font-weight: 400 700; font-display: swap; src: url('/fonts/playfair-display-v40-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400 600; font-display: swap; src: url('/fonts/dm-sans-v17-latin-regular.woff2') format('woff2'); }

:root {
  --color-black: #0A0A0B;
  --color-gold: #C8A84B;
  --color-gold-light: #E8C96A;
  --color-gold-dark: #8B6914;
  --color-white: #F5F3EF;
  --color-gray-900: #1A1A1C;
  --color-gray-700: #2D2D30;
  --color-gray-500: #5A5A60;
  --color-gray-300: #8A8A90;

  --bg: var(--color-black);
  --surface: var(--color-gray-900);
  --surface-2: var(--color-gray-700);
  --line: rgba(200, 168, 75, 0.2);
  --line-strong: rgba(200, 168, 75, 0.45);
  --text: var(--color-white);
  --muted: var(--color-gray-300);
  --accent: var(--color-gold);
  --accent-ink: var(--color-black);
  --gradient-gold: linear-gradient(135deg, #C8A84B 0%, #E8C96A 50%, #8B6914 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(200, 168, 75, 0.14) 0%, transparent 65%);
  --shadow-gold: 0 0 24px rgba(200, 168, 75, 0.25);
  --rec: #E5484D;

  --radius-lg: 16px;
  --radius-md: 8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui: 'DM Sans', system-ui, -apple-system, sans-serif;
  --prompter-size: 30px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }

.brand { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; margin: 0; }
.brand span { color: var(--accent); }
.eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }

.btn { border: 1px solid var(--line-strong); background: transparent; color: var(--accent); border-radius: 999px; padding: 12px 22px; font-weight: 600; transition: transform 150ms var(--ease), box-shadow 250ms ease; }
.btn-primary { background: var(--gradient-gold); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { box-shadow: var(--shadow-gold); }
.btn:active, .chip:active, .icon-btn:active { transform: scale(0.96); }
.icon-btn { border: 1px solid var(--line); background: rgba(10, 10, 11, 0.55); width: 42px; height: 42px; border-radius: 50%; font-size: 18px; display: grid; place-items: center; color: var(--text); transition: transform 120ms var(--ease), border-color 150ms ease; }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:focus-visible, .btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .card-inner:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Login */
.login { min-height: 100%; display: grid; align-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; padding-top: calc(24px + var(--safe-top)); background: var(--gradient-glow); }
.login-logo { width: min(240px, 70vw); height: auto; margin-bottom: 18px; }
.login-form { display: grid; gap: 12px; margin-top: 28px; width: min(340px, 100%); }
.login-form input { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-md); padding: 16px; font-size: 22px; letter-spacing: 0.35em; text-align: center; font-family: var(--font-ui); }
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-gold); }
.error { color: var(--rec); min-height: 1.2em; margin: 0; }

/* Liste */
.list-view { min-height: 100%; padding: calc(18px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); background: var(--gradient-glow) no-repeat; }
.list-inner { width: 100%; max-width: 720px; margin: 0 auto; }
@media (min-width: 900px) {
  .list-inner { max-width: 1040px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.list-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list-header img { height: clamp(30px, 8vw, 40px); width: auto; }
.list-title { font-family: var(--font-display); font-size: clamp(22px, 6vw, 30px); margin: 18px 0 0; font-weight: 600; }
.tabs { display: flex; gap: 4px; margin: 20px 0 8px; background: var(--surface); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.tab { flex: 1; border: 0; background: transparent; padding: 10px 8px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: background 200ms ease, color 200ms ease; }
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.tab b { font-weight: 600; color: var(--accent); margin-left: 4px; }
.hint { font-size: 13px; color: var(--muted); margin: 10px 4px 14px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.card-feedback-bg { position: absolute; inset: 0; opacity: 0; border-radius: var(--radius-lg); background: var(--gradient-gold); color: var(--accent-ink); display: flex; align-items: center; padding-left: 22px; font-weight: 600; }
.card-inner { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 16px 14px; touch-action: pan-y; transition: transform 260ms var(--ease), border-color 200ms ease; }
.card-inner:hover { border-color: var(--line-strong); }
.card-inner.dragging { transition: none; }
.card.swiping .card-feedback-bg { opacity: 1; }
.card-top { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge-viral { background: var(--gradient-gold); color: var(--accent-ink); }
.badge-viral.low { background: transparent; color: var(--accent); border: 1px solid var(--line-strong); }
.badge-kw { border: 1px solid var(--line); background: transparent; color: var(--text); font-family: var(--font-ui); letter-spacing: 0.08em; }
.card h2 { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.3; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: var(--color-gray-500); }
.empty { text-align: center; color: var(--muted); padding: 56px 12px; line-height: 1.6; }
.empty strong { display: block; font-family: var(--font-display); font-size: 20px; color: var(--text); margin-bottom: 6px; font-weight: 600; }

/* Prompter */
.prompter { position: fixed; inset: 0; background: #000; overflow: hidden; }
#cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#cam.mirrored, #stage.mirrored { transform: scaleX(-1); }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip-on { border-color: var(--accent); color: var(--accent); }
.prompter-text-wrap {
  position: absolute; left: 0; right: 0; top: calc(58px + var(--safe-top)); height: 42%;
  overflow: hidden; padding: 0 22px;
  /* Deckkraft per Knopf wählbar (klar/halb/dunkel) – sonst verdeckt das Feld das eigene Gesicht */
  background: linear-gradient(to bottom, rgba(10,10,11,var(--panel-alpha, 0.25)), rgba(10,10,11,calc(var(--panel-alpha, 0.25) * 0.8)) 70%, rgba(10,10,11,0));
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 80%, transparent 100%);
}
.prompter-text { font-size: var(--prompter-size); line-height: 1.4; font-weight: 600; padding: 30% 0 120%; will-change: transform;
  /* kräftiger Schatten statt dunkler Fläche → lesbar auch über dem Kamerabild */
  text-shadow: 0 0 2px rgba(0,0,0,0.95), 0 2px 6px rgba(0,0,0,0.9), 0 0 14px rgba(0,0,0,0.7); }
.prompter-text p { margin: 0 0 0.8em; }
.prompter-text .hook { color: var(--color-gold-light); }
.prompter-text .cta { color: var(--accent); font-style: italic; }
.prompter-text .stage { font-size: 0.5em; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; }
.top-bar { position: absolute; top: 0; left: 0; right: 0; padding: calc(8px + var(--safe-top)) 12px 8px; display: flex; align-items: center; gap: 10px; background: linear-gradient(to bottom, rgba(10,10,11,0.55), rgba(10,10,11,0)); }
.top-title { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(12px + var(--safe-bottom)); background: linear-gradient(to top, rgba(10,10,11,0.6), rgba(10,10,11,0)); display: grid; gap: 10px; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.control-row.secondary { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
.stepper { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.stepper .icon-btn { width: 38px; height: 38px; font-size: 14px; }
.chip { border: 1px solid var(--line-strong); background: rgba(10,10,11,0.55); color: var(--text); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: transform 120ms var(--ease); }
.chip:disabled { opacity: 0.35; }
.chip-done { background: var(--gradient-gold); color: var(--accent-ink); border-color: transparent; }
.rec-btn { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--color-gold-light); background: transparent; display: grid; place-items: center; flex: none; box-shadow: var(--shadow-gold); }
.rec-btn span { width: 58px; height: 58px; border-radius: 50%; background: var(--rec); transition: all 220ms var(--ease); }
.rec-btn.recording span { width: 28px; height: 28px; border-radius: 7px; }
.takes { display: flex; gap: 6px; overflow-x: auto; min-height: 0; scrollbar-width: none; }
.take { display: flex; align-items: center; gap: 2px; background: rgba(10,10,11,0.7); border: 1px solid var(--line); border-radius: 999px; padding: 3px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.take button { border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 600; padding: 5px 8px; border-radius: 999px; }
.take .take-play { background: rgba(200,168,75,0.16); }
.take .take-state { color: var(--muted); pointer-events: none; }
.take--uploaded .take-state { color: var(--accent); }
.take--failed .take-state { color: #F0A35E; pointer-events: auto; text-decoration: underline; }
.take .take-del { width: 26px; height: 26px; padding: 0; background: rgba(255,255,255,0.08); }
.player { position: absolute; inset: 0; z-index: 20; background: rgba(10,10,11,0.94); display: grid; place-items: center; gap: 14px; padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom)); align-content: center; }
.player video { max-width: 100%; max-height: 75vh; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #000; }
.rec-indicator { position: absolute; right: 14px; top: calc(66px + var(--safe-top)); display: flex; align-items: center; gap: 6px; background: rgba(10,10,11,0.65); padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.rec-indicator span { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: pulse 1s infinite; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 150px; font-family: var(--font-display); color: var(--color-gold-light); text-shadow: 0 4px 30px rgba(0,0,0,0.7); pointer-events: none; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Feedback-Sheet */
.sheet { border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface); color: var(--text); width: 100%; max-width: 640px; margin: auto auto 0; padding: 22px 16px calc(16px + var(--safe-bottom)); }
.sheet::backdrop { background: rgba(10,10,11,0.7); }
.sheet h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; font-size: 22px; }
.sheet textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; font: inherit; font-size: 16px; margin: 14px 0; resize: vertical; }
.sheet textarea:focus { outline: none; border-color: var(--accent); }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--shadow-gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}
