/* GET TV Next² – Handy-Begleiter. Gleiche Sprache wie am Fernseher: Schwarz, Elfenbein, Gold, Haarlinien. */
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #0b0907; --card: #14110d; --card-2: #1b1712;
  --ink: #f6f1e7; --ink-2: rgba(246, 241, 231, 0.66); --ink-3: rgba(246, 241, 231, 0.4);
  --hair: rgba(246, 241, 231, 0.1); --gold: #e3b866; --gold-hi: #f7da97; --gold-lo: #a97a34;
  --gold-fill: linear-gradient(180deg, #f7da97 0%, #e3b866 48%, #b98a3e 100%);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display: 'Cinzel', Georgia, serif; --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --top: env(safe-area-inset-top); --bottom: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.center { text-align: center; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

.app {
  height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; padding: calc(var(--top) + 14px) 18px calc(var(--bottom) + 88px);
  background: radial-gradient(120% 60% at 50% -10%, rgba(227, 184, 102, 0.1), transparent 60%), var(--bg);
}
.top { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.brand { display: flex; align-items: baseline; gap: 5px; }
.brand-mark { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: 0.12em; background: var(--gold-fill); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sup { font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.conn.is-on i { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.conn.is-warn i { background: #ec8a77; }

/* Hinweisflächen */
.gate { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 12px 60px; }
.gate-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(227, 184, 102, 0.4); color: var(--gold); margin: 0 auto 22px; }
.gate-icon svg { width: 32px; height: 32px; }
.gate-icon.is-busy { border-color: transparent; border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.25; }
.gate-text { margin: 12px auto 0; max-width: 320px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

.main { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; margin-top: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.main::-webkit-scrollbar { display: none; }

/* Was läuft */
.now {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px 14px; padding: 14px; border-radius: 20px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--hair);
  animation: rise 360ms var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.now-art { width: 64px; height: 92px; border-radius: 10px; background: #221c15 center/cover; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.now-art.is-wide { height: 64px; background-size: contain; background-repeat: no-repeat; background-color: #16120d; }
.now-body { min-width: 0; align-self: center; }
.now-title { margin: 6px 0 0; font-size: 18px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.now-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-progress { grid-column: 1 / -1; }
.track { position: relative; height: 22px; touch-action: none; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 3px; border-radius: 3px; background: rgba(246, 241, 231, 0.14); }
.fill { position: absolute; left: 0; top: 10px; height: 3px; border-radius: 3px; background: var(--gold); width: 0; }
.knob { position: absolute; top: 4px; width: 15px; height: 15px; margin-left: -7px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 4px rgba(227, 184, 102, 0.18); left: 0; }
.track.is-drag .knob { transform: scale(1.25); }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.now-ctrl { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.ic:active { background: rgba(246, 241, 231, 0.08); }
.ic--main { width: 54px; height: 54px; border: 1px solid rgba(227, 184, 102, 0.5); color: var(--gold-hi); }
.ic--main svg { width: 24px; height: 24px; }
.pill { margin-left: auto; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--hair); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pill svg { width: 17px; height: 17px; }
.pill:active { border-color: var(--gold); color: var(--gold); }

/* Touchpad */
.tab { display: flex; flex-direction: column; gap: 14px; animation: rise 280ms var(--ease) both; }
#tab-remote { flex: 1; min-height: 0; }
.now { flex: none; }
.pad {
  position: relative; flex: 1; min-height: 170px; border-radius: 28px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 50% 45%, #1d1812, #110e0a 70%); border: 1px solid rgba(227, 184, 102, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 50px rgba(0, 0, 0, 0.45);
}
.pad::after { content: ''; position: absolute; inset: 14px; border-radius: 20px; border: 1px dashed rgba(246, 241, 231, 0.05); pointer-events: none; }
.pad-glow {
  position: absolute; width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(227, 184, 102, 0.32), transparent 65%); transition: opacity 220ms;
}
.pad.is-touch .pad-glow { opacity: 1; }
.pad-arrow { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; display: grid; place-items: center; pointer-events: none; opacity: 0; color: var(--gold-hi); }
.pad-arrow.is-flash { animation: flash 300ms var(--ease); }
.pad-arrow svg { width: 40px; height: 40px; stroke-width: 1.6; }
@keyframes flash { 0% { opacity: 0; transform: scale(0.8); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15); } }
.pad-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); pointer-events: none; }

.keys { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.key {
  height: 72px; border-radius: 18px; background: var(--card); border: 1px solid var(--hair);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.key:active, .key button:active { color: var(--gold); border-color: rgba(227, 184, 102, 0.5); }
.key svg { color: var(--ink); }
.key--ch { flex-direction: column; gap: 0; padding: 4px 0; }
.key--ch button { flex: 1; width: 100%; display: grid; place-items: center; }
.key--ch span { font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); }
.numtoggle { flex: none; align-self: center; padding: 6px 14px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { height: 54px; border-radius: 14px; background: var(--card); border: 1px solid var(--hair); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.numpad button:active { color: var(--gold); }
.numpad .zero { grid-column: 2; }

/* Suche */
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--hair); }
.search:focus-within { border-color: rgba(227, 184, 102, 0.6); }
.search svg { color: var(--ink-3); flex: none; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 16px; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.res { text-align: left; animation: rise 260ms var(--ease) both; }
.res-art { aspect-ratio: 2 / 3; border-radius: 12px; background: #1f1a14 center/cover; display: grid; place-items: center; font-family: var(--display); font-size: 26px; color: var(--gold-lo); overflow: hidden; }
.res-art.is-live { background-size: 72% auto; background-repeat: no-repeat; background-color: #16120d; border: 1px solid var(--hair); }
.res-t { margin-top: 7px; font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-s { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Am Handy */
.watch { display: flex; flex-direction: column; gap: 14px; }
.watch video { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; }
.watch-meta { padding: 0 4px; }
.watch-err { margin: 10px 0 0; font-size: 13px; color: #ec8a77; }
.watch-empty { padding: 40px 10px; text-align: center; }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 9px; height: 52px; padding: 0 22px; border-radius: 26px;
  background: var(--gold-fill); color: #1a1206; font-weight: 700; font-size: 15px; box-shadow: 0 10px 30px rgba(227, 184, 102, 0.2);
}
.cta svg { width: 19px; height: 19px; }
.cta:disabled { opacity: 0.35; box-shadow: none; }
.watch-empty .cta { margin: 26px auto 0; }
.ghost { height: 48px; padding: 0 18px; border-radius: 24px; border: 1px solid var(--hair); font-weight: 600; font-size: 14px; color: var(--ink-2); }

/* Reiter */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom) + 10px); display: flex; height: 64px; padding: 6px; border-radius: 24px;
  background: rgba(20, 17, 13, 0.82); border: 1px solid var(--hair); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 18px; font-size: 11px; font-weight: 600; color: var(--ink-3); transition: color 200ms, background 200ms; }
.tabs button.is-on { color: var(--gold); background: rgba(227, 184, 102, 0.08); }

/* Blätter */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); animation: fade 200ms both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 22px 20px calc(var(--bottom) + 22px); border-radius: 26px 26px 0 0;
  background: #120f0b; border-top: 1px solid rgba(227, 184, 102, 0.25); animation: up 320ms var(--ease) both;
}
@keyframes up { from { transform: translateY(100%); } }
.sheet-title { margin: 8px 0 4px; font-family: var(--display); font-weight: 600; font-size: 22px; }
.field { display: flex; gap: 8px; margin: 16px 0 18px; }
.field input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: 14px; background: #000; border: 1.5px solid var(--gold); color: var(--ink); font: inherit; font-size: 17px; outline: 0; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; }
.sheet-actions .cta { flex: 1; }
.sheet-actions--stack { flex-direction: column; margin-top: 18px; }

.toast {
  position: fixed; left: 50%; top: calc(var(--top) + 14px); transform: translateX(-50%); max-width: calc(100% - 40px);
  padding: 11px 18px; border-radius: 20px; background: #1a150f; border: 1px solid rgba(227, 184, 102, 0.5); font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); animation: rise 240ms var(--ease) both; z-index: 10;
}
