/* OndaVeo TV para Philips Titan OS (app alojada) · 1920×1080. Sin variables CSS (el motor del navegador Titan OS varía por modelo). */
html, body {
  width: 1920px; height: 1080px; margin: 0; padding: 0; overflow: hidden;
  background: #08111f; color: #f4f8fc;
  font-family: "Museo Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 26px; -webkit-user-select: none; user-select: none;
}
* { box-sizing: border-box; }
body {
  background: #08111f;
  background-image: -webkit-radial-gradient(85% 0%, circle, rgba(255, 79, 174, 0.16), rgba(8, 17, 31, 0) 640px),
    -webkit-radial-gradient(0% 100%, circle, rgba(54, 234, 220, 0.14), rgba(8, 17, 31, 0) 700px);
  background-image: radial-gradient(circle 640px at 85% 0%, rgba(255, 79, 174, 0.16), rgba(8, 17, 31, 0)),
    radial-gradient(circle 700px at 0% 100%, rgba(54, 234, 220, 0.14), rgba(8, 17, 31, 0));
}
.hidden { display: none !important; }
.spacer { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 34px; margin-bottom: 18px; }
h2.gap { margin-top: 34px; }
h3 { font-size: 22px; text-transform: uppercase; letter-spacing: 3px; color: #9cafc3; margin: 0 0 14px 6px; }
label { display: block; color: #9cafc3; font-size: 22px; margin: 16px 0 10px; }
.hint { color: #8399b0; font-size: 21px; margin-top: 14px; }
.status { color: #c6d4e4; min-height: 32px; font-size: 23px; margin: 8px 0; }
.status.error { color: #ff8fa3; }

/* ---------- Pantallas ---------- */
.screen { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; padding: 48px 72px; }
.brand, .browser-head {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center;
}
.brand > * + *, .browser-head > * + * { margin-left: 22px; }
.brand h1 { font-size: 44px; letter-spacing: 6px; font-weight: 800; }
.brand h1 span { color: #36eadc; }
.brand p { color: #9cafc3; font-size: 22px; margin-top: 6px; letter-spacing: 1px; }
.brand-mark {
  width: 78px; height: 78px; border-radius: 22px; -webkit-flex: none; flex: none;
  background: #36eadc; background-image: -webkit-linear-gradient(135deg, #36eadc, #63caff 55%, #ff4fae);
  background-image: linear-gradient(135deg, #36eadc, #63caff 55%, #ff4fae);
  color: #08111f; font-size: 50px; font-weight: 900; line-height: 78px; text-align: center;
  box-shadow: 0 10px 40px rgba(54, 234, 220, 0.25);
}
.brand-mark.small { width: 58px; height: 58px; line-height: 58px; font-size: 36px; border-radius: 16px; }
.topline { margin-bottom: 40px; }

.panel {
  background: rgba(17, 31, 48, 0.92); border: 1px solid #21354c; border-radius: 24px; padding: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.setup-panel { width: 960px; margin: 90px auto 0; }

/* ---------- Controles ---------- */
button, input { font-family: inherit; }
button {
  border: 2px solid transparent; border-radius: 14px; padding: 14px 26px; min-height: 64px;
  background: #1a2d45; color: #f4f8fc; font-size: 24px; font-weight: 700; cursor: pointer;
  -webkit-transition: -webkit-transform 0.12s, background-color 0.12s; transition: transform 0.12s, background-color 0.12s;
}
button.primary { background: #36eadc; color: #06202a; }
button.danger { background: #3a1830; color: #ffc2dc; }
input {
  display: block; width: 100%; padding: 16px 20px; border-radius: 12px; font-size: 25px;
  border: 2px solid #2c4c65; background: #0a1626; color: #ffffff; outline: none;
}
input.wide { width: 100%; }
.browser-head input { width: 520px; }
.button-row {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-flex-wrap: wrap; flex-wrap: wrap; margin-top: 22px;
}
.button-row > * { margin: 0 16px 14px 0; }

/* Foco del mando: borde cian + elevación, visible a 3 m. */
.focusable:focus, .vrow:focus, .vlist:focus { outline: none; }
button.focusable:focus, .card:focus {
  border-color: #36eadc; background-color: #24405e;
  -webkit-transform: scale(1.05); transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(54, 234, 220, 0.35), 0 12px 30px rgba(0, 0, 0, 0.45);
}
button.primary:focus { background-color: #7af5ea; color: #06202a; }
button.danger:focus { background-color: #5a1f45; border-color: #ff4fae; box-shadow: 0 0 0 4px rgba(255, 79, 174, 0.35); }
input:focus { border-color: #36eadc; box-shadow: 0 0 0 4px rgba(54, 234, 220, 0.3); }

.chip {
  padding: 10px 20px; border-radius: 999px; background: #13243a; border: 1px solid #2c4c65;
  color: #c6d4e4; font-size: 21px; white-space: nowrap;
}
.chip.ok { border-color: #36eadc; color: #8ff6ec; }
.chip.bad { border-color: #ff4fae; color: #ffb3d6; }

/* ---------- Inicio ---------- */
.dashboard { display: -webkit-box; display: -webkit-flex; display: flex; height: 860px; }
.side-panel { width: 560px; -webkit-flex: none; flex: none; margin-right: 32px; }
.lists-panel { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; overflow: hidden; }
.pair-code { font-size: 66px; font-weight: 800; letter-spacing: 12px; color: #36eadc; margin: 40px 0 6px; }
.pair-qr { margin: 18px 0; }
.pair-qr img { display: block; width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: 14px; }
.card-grid { margin: 10px -12px 0; padding: 12px; height: 700px; overflow: hidden; }
.card {
  display: inline-block; vertical-align: top; width: 360px; height: 168px; margin: 0 22px 22px 0;
  text-align: left; padding: 24px; position: relative; background: #0f2034; border: 2px solid #21354c;
}
.card-title { display: block; font-size: 28px; }
.card small { display: block; color: #9cafc3; font-size: 20px; margin-top: 12px; font-weight: 400; }
.card-ghost { background: transparent; border-style: dashed; }
.badge {
  position: absolute; right: 18px; bottom: 16px; font-style: normal; font-size: 17px; font-weight: 700;
  color: #ff4fae; letter-spacing: 1px; text-transform: uppercase;
}

/* ---------- Navegador ---------- */
.browser-head { height: 80px; }
.browser-head h1 { font-size: 40px; max-width: 760px; }
.browser { display: -webkit-box; display: -webkit-flex; display: flex; height: 820px; margin-top: 24px; }
.col-categories { width: 520px; -webkit-flex: none; flex: none; margin-right: 32px; }
.col-channels { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; }
#categoryList, #channelList {
  position: relative; height: 770px; overflow: hidden; border-radius: 20px;
  background: rgba(17, 31, 48, 0.75); border: 1px solid #21354c; padding: 0 22px 0 0;
}
#categoryList { height: 776px; }
.xtream #categoryList { height: 700px; }
#channelList { height: 756px; }
.vlist-inner { position: relative; }
.vrow {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center;
  padding: 0 20px; border-radius: 14px; border: 2px solid transparent; color: #dce6f2;
}
.vrow > * + * { margin-left: 18px; }
.vrow.active { color: #36eadc; font-weight: 700; }
.vrow.selected { background: rgba(54, 234, 220, 0.07); }
.vrow:focus { background: #1d3854; border-color: #36eadc; color: #ffffff; box-shadow: 0 0 0 3px rgba(54, 234, 220, 0.25); }
.row-name { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; font-size: 27px; display: block; }
.row-count { color: #8399b0; font-size: 21px; }
.row-num { width: 72px; color: #8399b0; font-size: 22px; text-align: right; -webkit-flex: none; flex: none; }
.row-badge {
  width: 64px; height: 56px; border-radius: 12px; background: #13243a; border: 1px solid #2c4c65;
  color: #63caff; font-weight: 800; font-size: 21px; line-height: 54px; text-align: center; overflow: hidden; -webkit-flex: none; flex: none;
}
.row-badge img { width: 100%; height: 100%; object-fit: contain; }
.row-text { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; }
.row-group { display: block; color: #8399b0; font-size: 19px; margin-top: 4px; }
.row-fav { color: #ffd34f; font-size: 28px; }
.row-warn { color: #ffb36b; font-size: 18px; white-space: nowrap; }
.vlist-empty { padding: 40px 24px; color: #9cafc3; font-size: 25px; }
.vlist-bar { position: absolute; right: 8px; top: 12px; bottom: 12px; width: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); }
.vlist-thumb { position: absolute; left: 0; width: 6px; border-radius: 3px; background: #36eadc; }
.legend {
  position: absolute; left: 72px; right: 72px; bottom: 30px; height: 44px;
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center; color: #9cafc3; font-size: 21px;
}
.legend > span + span { margin-left: 30px; }
.legend .status { margin: 0; }
.key { display: inline-block; width: 26px; height: 18px; border-radius: 5px; margin-right: 10px; vertical-align: middle; }
.k-yellow { background: #f5c400; }
.k-green { background: #2fb450; }
.k-blue { background: #2f7cf5; }
.k-ch { width: auto; height: auto; padding: 1px 6px; border: 1px solid #9cafc3; font-style: normal; font-size: 15px; }

/* Pestañas Xtream: Directo / Películas / Series. */
.tabs { display: -webkit-box; display: -webkit-flex; display: flex; margin: 0 0 16px 0; }
.tabs button { min-height: 56px; padding: 8px 22px; font-size: 22px; margin-right: 12px; }
.tabs button.on { background: #36eadc; color: #06202a; }
.tabs button.on:focus { background-color: #7af5ea; color: #06202a; }
.row-more { color: #63caff; font-size: 20px; white-space: nowrap; }

/* ---------- Reproductor ---------- */
.player { padding: 0; background: #000000; }
#video { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: #000000; }
.osd {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 80px 44px;
  background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(4, 10, 20, 0.92) 45%);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(4, 10, 20, 0.92) 45%);
}
.osd-info { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }
.osd-number {
  min-width: 110px; padding: 0 18px; height: 84px; line-height: 84px; border-radius: 18px; text-align: center;
  font-size: 44px; font-weight: 800; color: #06202a; background: #36eadc; margin-right: 28px;
}
.osd-text { min-width: 0; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.osd-name { font-size: 46px; font-weight: 800; }
.osd-group { font-size: 24px; color: #9cafc3; margin-top: 6px; }
.digit-box {
  position: absolute; right: 80px; top: 60px; padding: 14px 34px; border-radius: 18px;
  background: rgba(8, 17, 31, 0.9); border: 2px solid #36eadc; font-size: 64px; font-weight: 800; color: #36eadc;
}
.spinner {
  width: 96px; height: 96px; border-radius: 50%; border: 8px solid rgba(255, 255, 255, 0.15); border-top-color: #36eadc;
  -webkit-animation: spin 0.9s linear infinite; animation: spin 0.9s linear infinite;
}
.seek-box { right: auto; left: 80px; font-size: 44px; }
.player > .spinner { position: absolute; left: 912px; top: 380px; }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Ajustes ---------- */
.settings { display: -webkit-box; display: -webkit-flex; display: flex; height: 860px; }
.settings-col { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; overflow: hidden; }
.settings-col + .settings-col { margin-left: 32px; }
.settings-lists { max-height: 560px; overflow: hidden; }
.list-row {
  display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #21354c;
}
.list-row > button { margin-left: 14px; min-height: 56px; padding: 10px 20px; font-size: 22px; }
.list-info { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; }
.list-info span { display: block; font-size: 26px; }
.list-info small { color: #9cafc3; font-size: 19px; }
.toggle-row {
  display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center;
  -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #1a2d45;
}
.toggle { min-width: 120px; }
.toggle.on { background: #36eadc; color: #06202a; }

/* ---------- Capas ---------- */
.dialog-backdrop { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: rgba(3, 8, 16, 0.78); z-index: 20; }
.dialog { width: 1040px; margin: 220px auto 0; border-color: #2c4c65; }
#dialogText { color: #c6d4e4; font-size: 25px; line-height: 1.45; }
.field { margin-top: 10px; }
.busy {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 30; padding-top: 400px;
  background: rgba(3, 8, 16, 0.82); text-align: center; font-size: 30px;
}
.busy .spinner { margin: 0 auto 30px; }
.toast {
  position: absolute; left: 50%; bottom: 90px; width: 1100px; margin-left: -550px; z-index: 40;
  padding: 22px 32px; border-radius: 18px; background: #13243a; border: 2px solid #36eadc; font-size: 24px; text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.toast.error { border-color: #ff4fae; }
.banner {
  position: absolute; left: 0; right: 0; top: 0; z-index: 50; padding: 14px; text-align: center;
  background: #5a1f45; color: #ffffff; font-size: 23px; font-weight: 700;
}

/* Diálogos: contraste y lectura más claros en TV. */
.dialog.panel {
  border-width: 2px;
  border-color: rgba(92, 200, 233, .62);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 28px rgba(54, 234, 220, .12);
}
.dialog h2 { color: #f4f8ff; margin-bottom: 12px; }
.dialog .button-row { gap: 12px; }
