@charset "UTF-8";
:root {
  --color-background: #0b0c10;
  --color-surface: #15171d;
  --color-surface-raised: #1c1f27;
  --color-accent: #caa15d;
  --color-text: #f4f1ea;
  --color-text-muted: #9a9a9f;
  --color-border: #262a33;
  --font-family-base: "Segoe UI", system-ui, sans-serif;
  --font-family-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --radius-base: 10px;
  --transition-base: 200ms ease;
}

@keyframes tm-ken-burns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family-base);
}
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
#tm-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.tm-mt-4 {
  margin-top: 4px;
}
.tm-mb-4 {
  margin-bottom: 4px;
}
.tm-mt-8 {
  margin-top: 8px;
}
.tm-mb-8 {
  margin-bottom: 8px;
}
.tm-mt-16 {
  margin-top: 16px;
}
.tm-mb-16 {
  margin-bottom: 16px;
}
.tm-mt-24 {
  margin-top: 24px;
}
.tm-mb-24 {
  margin-bottom: 24px;
}
.tm-mt-32 {
  margin-top: 32px;
}
.tm-mb-32 {
  margin-bottom: 32px;
}
/* ==========================================================================
   Fernbedienungs-Modus (10-Fuss-Oberflaeche)
   --------------------------------------------------------------------------
   Greift nur, wenn TvMode html[data-tm-input="remote"] gesetzt hat. Die
   Zeiger-Variante der Seite bleibt unangetastet.

   Drei Leitgedanken:
   - Lesbar aus drei Metern: alles waechst ueber die Wurzel-Schriftgroesse
     mit, gedaempfte Farben werden aufgehellt (Fernseher verschlucken
     kontrastarmes Grau deutlich staerker als ein Monitor).
   - Nichts haengt am Mauszeiger: jeder :hover-Effekt hat hier eine
     :focus-Entsprechung, sonst waere die Seite mit der Fernbedienung
     schlicht unsichtbar bedienbar.
   - Sparsam mit der Grafikleistung: Dauer-Animationen und grossflaechige
     Schlagschatten kosten auf Tizen/webOS spuerbar Bilder pro Sekunde.
   ========================================================================== */

html[data-tm-input="remote"] {
  /* Fernseher schneiden am Rand ab (Overscan). Alles Bedienbare bleibt
     innerhalb dieses Sicherheitsabstands. */
  --tm-safe-x: 4.5vw;
  --tm-safe-y: 3vh;
  --color-text-muted: #b6b6be;
  font-size: 20px;
  scroll-padding: 25vh var(--tm-safe-x);
  overflow-x: hidden;
}

/* Der Mauszeiger wird bewusst NICHT ausgeblendet: LGs Magic Remote ist ein
   Zeigegeraet, und auf webOS-Geraeten ist sie die uebliche Bedienung. Wer
   zeigt, soll weiter zeigen koennen -- diese Schicht ergaenzt die
   Tastenbedienung, sie ersetzt die Maus nicht. */

/* --- Fokus: die einzige Ortsangabe, die der Nutzer hat ------------------- */

html[data-tm-input="remote"] :focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

html[data-tm-input="remote"] :focus:not(:focus-visible) {
  outline: 3px solid var(--color-accent);
}

html[data-tm-input="remote"] a:focus,
html[data-tm-input="remote"] button:focus,
html[data-tm-input="remote"] summary:focus,
html[data-tm-input="remote"] select:focus,
html[data-tm-input="remote"] input:focus {
  border-radius: var(--radius-base);
  text-decoration: none;
}

/* Scrollen zentriert den Fokus -- ohne Rand klebte er sonst an der Kante. */
html[data-tm-input="remote"] a,
html[data-tm-input="remote"] button,
html[data-tm-input="remote"] select,
html[data-tm-input="remote"] input,
html[data-tm-input="remote"] summary {
  scroll-margin: 20vh var(--tm-safe-x);
}

/* --- Flaeche ------------------------------------------------------------ */

html[data-tm-input="remote"] #tm-main {
  max-width: none;
  padding: var(--tm-safe-y) var(--tm-safe-x) 10vh;
}

html[data-tm-input="remote"] #tm-header {
  padding: var(--tm-safe-y) var(--tm-safe-x);
  gap: 1rem;
  flex-wrap: wrap;
}

html[data-tm-input="remote"] .tm-header__brand {
  font-size: 1.6rem;
}

html[data-tm-input="remote"] .tm-header__nav {
  gap: 0.4rem;
  margin-left: 1.5rem;
  flex-wrap: wrap;
}

html[data-tm-input="remote"] .tm-header__nav a {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-base);
}

html[data-tm-input="remote"] .tm-header__nav a:focus {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

html[data-tm-input="remote"] .tm-header__lang button {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
}

html[data-tm-input="remote"] .tm-header__tv {
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
}

html[data-tm-input="remote"] #tm-footer {
  padding-bottom: var(--tm-safe-y);
}

/* --- Bibliothek --------------------------------------------------------- */

html[data-tm-input="remote"] .tm-library__grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2.4rem 1.6rem;
}

/* Vergroessert wird die ganze Karte, nicht nur das Bild: waechst allein
   das Bild, schiebt es sich ueber den darunterstehenden Titel. Der
   Fokusrahmen sitzt am inneren <div>, weil der Fokus selbst am
   umschliessenden <a> haengt. */
html[data-tm-input="remote"] .tm-poster {
  position: relative;
  transition: transform 120ms ease;
}

html[data-tm-input="remote"] .tm-poster:focus {
  outline: none;
  transform: scale(1.06);
  z-index: 1;
}

html[data-tm-input="remote"] .tm-poster:focus .tm-poster__image {
  transform: none;
  border-color: var(--color-accent);
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

html[data-tm-input="remote"] .tm-poster:focus .tm-poster__title {
  color: var(--color-accent);
}

html[data-tm-input="remote"] .tm-poster__title {
  font-size: 1rem;
}

html[data-tm-input="remote"] .tm-poster__year {
  font-size: 0.85rem;
}

/* Dauerhaft laufende Transformationen kosten auf TV-Browsern konstant
   Rechenzeit, auch wenn das Bild nur langsam waechst. Im Raster faellt
   das direkt als ruckelnder Fokuswechsel auf. */
html[data-tm-input="remote"] .tm-hero__backdrop {
  animation: none;
}

/* Grossflaechige Schlagschatten kosten beim Fokuswechsel im Raster
   spuerbar Zeichenzeit -- der Rahmen genuegt als Hervorhebung. */
html[data-tm-input="remote"] .tm-poster__image {
  transition: border-color 120ms ease;
  box-shadow: none;
}

html[data-tm-input="remote"] .tm-hero {
  min-height: 52vh;
}

html[data-tm-input="remote"] .tm-hero__content {
  padding: 2rem;
  max-width: 46rem;
}

html[data-tm-input="remote"] .tm-hero__cta {
  padding: 0.8rem 1.6rem;
  font-size: 1.1rem;
}

/* --- Formularelemente --------------------------------------------------- */

html[data-tm-input="remote"] input,
html[data-tm-input="remote"] select,
html[data-tm-input="remote"] button,
html[data-tm-input="remote"] textarea {
  font-size: 1rem;
  min-height: 2.6rem;
}

html[data-tm-input="remote"] .tm-library__search {
  gap: 0.8rem;
}

html[data-tm-input="remote"] .tm-library__search input {
  min-width: 18rem;
}

/* Der aufgeklappte Systemdialog der TV-Browser ist mit der Fernbedienung
   kaum zu treffen; TvNavigator faengt das Aufklappen ab und zeigt die
   Liste als Vollbild-Dialog. Das <select> selbst bleibt als Anzeige. */
html[data-tm-input="remote"] select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-accent) 50%),
                    linear-gradient(135deg, var(--color-accent) 50%, transparent 50%);
  background-position: right 1.1rem center, right 0.75rem center;
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
}

html[data-tm-input="remote"] .tm-library__pagination a {
  min-width: 3rem;
  height: 3rem;
  font-size: 1rem;
}

/* --- Detailseite -------------------------------------------------------- */

html[data-tm-input="remote"] .tm-detail__poster {
  flex: 0 0 16rem;
  width: 16rem;
}

html[data-tm-input="remote"] .tm-detail__play {
  padding: 0.9rem 2rem;
  font-size: 1.15rem;
}

html[data-tm-input="remote"] .tm-detail__season summary {
  padding: 0.9rem 1.2rem;
}

html[data-tm-input="remote"] .tm-detail__season li {
  padding: 0.6rem 0;
  gap: 1rem;
}

html[data-tm-input="remote"] .tm-detail__description,
html[data-tm-input="remote"] .tm-detail__seasons {
  max-width: 55rem;
}

/* ==========================================================================
   Dialoge fuer die Fernbedienung (Auswahlliste / Rueckfrage)
   Bewusst nicht an den Modus gekoppelt: wer sie im Zeiger-Modus aufruft,
   soll dasselbe Fenster sehen.
   ========================================================================== */

.tm-tv-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 9, 0.85);
}

.tm-tv-overlay__panel {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  padding: 1.5rem;
  min-width: 22rem;
  max-width: 44rem;
  max-height: 80vh;
  overflow-y: auto;
}

.tm-tv-overlay__title {
  margin: 0 0 1rem;
  font-family: var(--font-family-display);
  font-size: 1.3rem;
  color: var(--color-text);
}

.tm-tv-overlay__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tm-tv-overlay__option {
  font-family: var(--font-family-base);
  font-size: 1.05rem;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-base);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.tm-tv-overlay__option.is-selected::before {
  content: "\2713\00a0";
  color: var(--color-accent);
}

.tm-tv-overlay__option:hover,
.tm-tv-overlay__option:focus {
  background: var(--color-accent);
  color: var(--color-background);
  outline: none;
  border-color: var(--color-accent);
}

.tm-tv-overlay__option:focus.is-selected::before {
  color: var(--color-background);
}
