/* Dominius Play - Web Player. Mesmas cores do aplicativo. */
:root {
  --bg: #070A12; --card: #0F1628; --card2: #151E36; --border: #1E2842;
  --text: #EAEEF7; --muted: #8E98B0; --orange: #FF7A2F; --yellow: #FFC94D; --pink: #FF4D6D;
  --grad: linear-gradient(90deg, #FFC94D, #FF7A2F, #FF4D6D);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
@media (min-width: 1200px) { html { font-size: 18px; } }
@media (min-width: 1600px) { html { font-size: 22px; } }
@media (min-width: 2400px) { html { font-size: 30px; } }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.screen { position: fixed; inset: 0; top: 0; right: 0; bottom: 0; left: 0; overflow-y: auto; overflow-x: hidden; padding: 1.4rem 2rem 2rem; }
.logo { font-weight: 800; letter-spacing: .08em; font-size: 1.4rem; color: #fff; white-space: nowrap; }
.logo b { color: var(--orange); }
.logo.big { font-size: 2.2rem; }

/* Bot&otilde;es e campos */
.btn { border: 2px solid var(--border); background: transparent; border-radius: .8rem; padding: .8rem 1.4rem; font-weight: 700; cursor: pointer; outline: none; white-space: nowrap; }
.btn.sm { padding: .45rem .9rem; font-size: .9rem; }
.btn.primary { background: var(--grad); color: #1A0E05; border-color: transparent; }
.btn.ghost:hover, .btn.ghost:focus { background: var(--card2); border-color: var(--orange); }
.btn.primary:focus, .btn.primary:hover { box-shadow: 0 0 0 3px #fff; }
.btn[disabled] { opacity: .5; }
.field { width: 100%; background: var(--card); border: 2px solid var(--border); border-radius: .8rem; padding: .85rem 1rem; font-size: 1.1rem; outline: none; }
.field:focus { border-color: var(--orange); }
.field.code { text-align: center; font-size: 2rem; letter-spacing: .3em; color: var(--yellow); }
.msg { min-height: 1.3em; margin: .6rem 0; }
.msg.err { color: var(--pink); }

/* Entrada */
.login-wrap { max-width: 30rem; margin: 6vh auto 2rem; text-align: center; }
.login-wrap h1 { font-size: 1.5rem; margin: 1.6rem 0 .4rem; }
.login-wrap form { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.2rem; }
#lg-user-box { display: flex; flex-direction: column; gap: .8rem; }
#lg-notices { margin-top: 1.4rem; text-align: left; }

/* Topo */
.top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.top .logo { flex: 1; }
.top h2 { flex: 1; margin: 0; font-size: 1.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { color: var(--yellow); font-weight: 700; font-size: .9rem; }
.field.search { width: 18rem; padding: .55rem .9rem; font-size: 1rem; }

/* In&iacute;cio */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: .4rem 0 1.6rem; }
.card { background: var(--card); border: 2px solid var(--border); border-radius: 1.1rem; padding: 1.6rem 1rem; text-align: center; cursor: pointer; outline: none; transition: transform .12s, border-color .12s; }
.card:focus, .card:hover { border-color: var(--orange); background: var(--card2); transform: scale(1.03); }
.card .ico { font-size: 2.6rem; line-height: 1; }
.card .t { font-size: 1.25rem; font-weight: 800; margin-top: .6rem; }
.card .s { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.rail-title { font-size: 1.15rem; font-weight: 800; margin: .4rem 0 .6rem; }
.rail { display: flex; gap: .8rem; overflow-x: auto; overflow-y: hidden; padding: .4rem .2rem 1rem; margin-bottom: .8rem; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .poster { flex: 0 0 8.5rem; }

/* P&ocirc;steres e linhas */
.poster { background: var(--card); border: 2px solid var(--border); border-radius: .8rem; padding: .35rem; cursor: pointer; outline: none; position: relative; transition: transform .12s, border-color .12s; }
.poster:focus, .poster:hover { border-color: var(--orange); transform: scale(1.06); z-index: 2; }
.poster .img { width: 100%; padding-top: 145%; border-radius: .55rem; background: var(--card2) center/cover no-repeat; position: relative; }
.poster .img span.ph { position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: .5rem; font-weight: 700; color: var(--muted); font-size: .85rem; }
.poster .name { font-size: .8rem; margin-top: .35rem; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.2em; }
.badge { position: absolute; top: .6rem; left: .6rem; font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: .35rem; color: var(--bg); background: var(--yellow); }
.badge.series { background: var(--pink); }
.prog-mini { height: 4px; background: var(--border); border-radius: 2px; margin-top: .3rem; overflow: hidden; }
.prog-mini i { display: block; height: 100%; background: var(--orange); }

.notice { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; margin-bottom: 1rem; }
.notice img { width: 100%; max-height: 12rem; object-fit: cover; border-radius: .7rem; margin-bottom: .7rem; display: block; }
.notice .k { font-size: .65rem; color: var(--muted); font-weight: 800; letter-spacing: .08em; margin-bottom: .3rem; }
.notice .t { font-weight: 800; font-size: 1.1rem; }
.notice .b { color: var(--muted); margin-top: .3rem; white-space: pre-line; }
.notice .btn { margin-top: .8rem; }
.expired { background: var(--card); border: 2px solid var(--pink); border-radius: 1.1rem; padding: 2rem; text-align: center; max-width: 34rem; margin: 2rem auto; }
.expired .ico { font-size: 3rem; }
.expired h3 { font-size: 1.5rem; margin: .6rem 0; }

/* Lista */
#s-browse { display: flex; flex-direction: column; }
#s-browse[hidden] { display: none !important; }
.browse { display: flex; gap: 1rem; flex: 1; min-height: 0; }
.cats { width: 15rem; flex: none; overflow-y: auto; padding: .2rem; }
.cat { display: block; width: 100%; text-align: left; background: transparent; border: 2px solid transparent; border-radius: .6rem; padding: .6rem .8rem; margin-bottom: .2rem; cursor: pointer; outline: none; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat.sel { color: var(--text); background: var(--card); }
.cat:focus, .cat:hover { border-color: var(--orange); color: var(--text); background: var(--card2); }
.items-wrap { flex: 1; overflow-y: auto; padding: .3rem .4rem 2rem; min-width: 0; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem .8rem; }
.items.rows { display: flex; flex-direction: column; gap: .35rem; }
.row { display: flex; align-items: center; gap: .9rem; background: var(--card); border: 2px solid var(--border); border-radius: .7rem; padding: .45rem .7rem; cursor: pointer; outline: none; }
.row:focus, .row:hover { border-color: var(--orange); background: var(--card2); }
.row .num { color: var(--muted); width: 2.6rem; text-align: right; font-size: .85rem; flex: none; }
.row .lg { width: 3.4rem; height: 2.3rem; flex: none; background: #0b111f center/contain no-repeat; border-radius: .35rem; }
.row .nm { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .tx { flex: 1; min-width: 0; }
.row .tx .nm { display: block; }
.row .now { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .1rem; }
.row .now b { color: var(--yellow); font-weight: 700; }
.row .now .pb { display: inline-block; vertical-align: middle; width: 3rem; height: 3px; background: var(--border); border-radius: 2px; margin-left: .4rem; overflow: hidden; }
.row .now .pb i { display: block; height: 100%; background: var(--orange); }
.guide { display: flex; flex-direction: column; gap: .35rem; }
.gi { background: var(--card2); border: 2px solid var(--border); border-radius: .6rem; padding: .55rem .9rem; outline: none; }
.gi:focus { border-color: var(--orange); }
.gi.on { border-color: var(--yellow); }
.gi .h { color: var(--yellow); font-weight: 800; margin-right: .6rem; }
.gi .d { color: var(--muted); font-size: .85rem; margin-top: .25rem; }

/* Janela */
.modal { position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0; background: rgba(3,5,10,.82); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal-box { background: var(--card); border: 1px solid var(--border); border-radius: 1.1rem; width: 100%; max-width: 46rem; max-height: 90vh; overflow-y: auto; padding: 1.4rem; }
.modal h3 { margin: 0 0 .3rem; font-size: 1.35rem; }
.modal .sub { color: var(--muted); margin-bottom: 1rem; }
.seasons { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.seasons .btn.sel { border-color: var(--yellow); color: var(--yellow); }
.eps { display: flex; flex-direction: column; gap: .35rem; }
.ep { text-align: left; background: var(--card2); border: 2px solid var(--border); border-radius: .6rem; padding: .6rem .9rem; cursor: pointer; outline: none; display: flex; gap: .8rem; align-items: center; }
.ep:focus, .ep:hover { border-color: var(--orange); }
.ep .n { color: var(--yellow); font-weight: 800; flex: none; }
.ep .w { margin-left: auto; color: var(--muted); font-size: .8rem; flex: none; }
.modal-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; justify-content: flex-end; }
.kv { color: var(--muted); line-height: 1.6; }
.kv b { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--orange); padding: .7rem 1.2rem; border-radius: .7rem; z-index: 60; }

/* Player */
.player { padding: 0; background: #000; overflow: hidden; }
.player video { position: absolute; inset: 0; top: 0; left: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.pl-top, .pl-bottom { position: absolute; left: 0; right: 0; padding: 1.2rem 1.8rem; transition: opacity .3s; z-index: 3; }
.pl-top { top: 0; display: flex; gap: 1rem; align-items: flex-start; background: linear-gradient(rgba(0,0,0,.8), transparent); }
.pl-bottom { bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.player.idle .pl-top, .player.idle .pl-bottom { opacity: 0; pointer-events: none; }
.player.idle { cursor: none; }
.pl-info { flex: 1; min-width: 0; }
.pl-title { font-size: 1.35rem; font-weight: 800; text-shadow: 0 2px 6px #000; }
.pl-epg { color: #d6dbe7; font-size: .95rem; margin-top: .25rem; text-shadow: 0 2px 6px #000; }
.pl-epg b { color: var(--yellow); }
.bar { position: relative; height: .45rem; background: rgba(255,255,255,.2); border-radius: .3rem; margin-bottom: .9rem; }
.bar .buf, .bar .prog { position: absolute; left: 0; top: 0; bottom: 0; border-radius: .3rem; width: 0; }
.bar .buf { background: rgba(255,255,255,.3); }
.bar .prog { background: var(--grad); }
.bar input { position: absolute; left: 0; right: 0; top: -.6rem; width: 100%; height: 1.6rem; opacity: 0; cursor: pointer; margin: 0; }
.pl-ctrls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pl-ctrls .time { margin-right: auto; font-variant-numeric: tabular-nums; }
.player.live .pl-bottom { display: none; }
.pl-side { position: absolute; top: 0; right: 0; bottom: 0; width: 24rem; max-width: 85vw; background: rgba(7,10,18,.95); border-left: 1px solid var(--border); z-index: 5; display: flex; flex-direction: column; }
.side-head { padding: 1rem 1.2rem; font-weight: 800; font-size: 1.1rem; }
.side-list { overflow-y: auto; padding: 0 .7rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.side-list .row.on { border-color: var(--yellow); }
.side-list .row { align-items: flex-start; }
.side-list .row .num { padding-top: .1rem; }
.row .nx { display: block; font-size: .75rem; color: var(--muted); margin-top: .25rem; line-height: 1.45; }
.row .nx span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nx i { font-style: normal; color: var(--text); opacity: .75; margin-right: .35rem; }
.pl-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(7,10,18,.92); border: 1px solid var(--border); border-radius: 1rem; padding: 1.4rem 1.8rem; text-align: center; z-index: 6; max-width: 90vw; }
.pl-msg p { margin: 0 0 1rem; white-space: pre-line; }
.pl-zap { position: absolute; top: 1.4rem; right: 1.8rem; background: rgba(7,10,18,.85); border: 1px solid var(--orange); border-radius: .8rem; padding: .7rem 1.1rem; font-weight: 800; z-index: 4; }
.spin { position: absolute; left: 50%; top: 50%; width: 3.4rem; height: 3.4rem; margin: -1.7rem 0 0 -1.7rem; border: .3rem solid rgba(255,255,255,.2); border-top-color: var(--orange); border-radius: 50%; animation: sp 0.9s linear infinite; z-index: 2; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Celular */
@media (max-width: 760px) {
  .screen { padding: 1rem 1rem 1.5rem; }
  .cards { grid-template-columns: 1fr; gap: .7rem; }
  .card { padding: 1rem; display: flex; align-items: center; gap: 1rem; text-align: left; }
  .card .ico { font-size: 2rem; }
  .card .t { margin-top: 0; font-size: 1.1rem; }
  .top { flex-wrap: wrap; gap: .6rem; }
  .status { order: 3; width: 100%; }
  .field.search { width: 100%; order: 3; }
  .browse { flex-direction: column; }
  .cats { width: auto; display: flex; overflow-x: auto; overflow-y: hidden; flex: none; gap: .3rem; padding-bottom: .3rem; }
  .cat { width: auto; flex: none; margin: 0; }
  .items { grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr)); gap: .8rem .6rem; }
  .rail .poster { flex-basis: 6.8rem; }
  .pl-top, .pl-bottom { padding: .8rem 1rem; }
  .pl-title { font-size: 1.05rem; }
}
