/* RebaMovie TV player (Cast receiver). Colours and fonts from the apps. Sized for a 1280×720 TV canvas. */
@font-face { font-family: Outfit; font-weight: 400; src: url(fonts/Outfit-400.ttf); }
@font-face { font-family: Outfit; font-weight: 600; src: url(fonts/Outfit-600.ttf); }
@font-face { font-family: Outfit; font-weight: 800; src: url(fonts/Outfit-800.ttf); }
@font-face { font-family: Readex; font-weight: 400; src: url(fonts/Readex-400.ttf); }
@font-face { font-family: Readex; font-weight: 500; src: url(fonts/Readex-500.ttf); }

:root { --green: #1FDF67; --bg: #090909; --text: #ECEBEB; --muted: #B4B8B4; --warn: #F9CF58; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; font-family: Readex, sans-serif; }

#video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }

.layer { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.layer.show { opacity: 1; }

/* ───── start screen ───── */
#splash { background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.word { font-family: Outfit; font-weight: 800; font-size: 72px; letter-spacing: -1px; display: flex; }
.word .reba { color: #fff; animation: rise .8s ease-out both; }
.word .movie { color: var(--green); display: inline-block; overflow: hidden; max-width: 0; white-space: nowrap; animation: reveal 1.1s 1.1s ease-in-out forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes reveal { to { max-width: 400px; } }
.bar { width: 140px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; opacity: 0; animation: fade .7s 2s forwards; }
.bar i { display: block; width: 60px; height: 4px; background: linear-gradient(90deg, transparent, var(--green), transparent); animation: sweep 1.2s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: translateX(-20px); } to { transform: translateX(100px); } }
@keyframes fade { to { opacity: 1; } }
#splash p { font-size: 22px; color: var(--muted); opacity: 0; animation: fade .7s 2.3s forwards; }

/* ───── loading a title ───── */
#loading { background: #000; }
.backdrop { position: absolute; inset: 0; background-size: cover; background-position: center right; transform: scale(1.04); transition: transform 8s linear; }
#loading.show .backdrop { transform: scale(1); }
.shade-left { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,9,9,.97) 0%, rgba(9,9,9,.86) 38%, rgba(9,9,9,.1) 75%); }
.loading-info { position: absolute; left: 80px; top: 50%; transform: translateY(-50%); width: 520px; display: flex; flex-direction: column; gap: 16px; }
.brand-small, #watermark { font-family: Outfit; font-weight: 800; font-size: 26px; color: #fff; }
.brand-small span, #watermark span { color: var(--green); }
.logo { max-width: 420px; max-height: 150px; object-fit: contain; object-position: left; display: none; }
#loading h1 { font-family: Outfit; font-weight: 800; font-size: 54px; line-height: 1.05; }
#loading p { font-size: 20px; line-height: 1.45; color: rgba(236,235,235,.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { font-size: 17px; font-weight: 500; padding: 6px 16px; border-radius: 30px; background: rgba(255,255,255,.12); }
.chip.green { color: var(--green); }
.pulse { position: absolute; left: 50%; bottom: 40px; width: 160px; height: 4px; margin-left: -80px; background: var(--green); border-radius: 4px; animation: flip 1s ease-in-out infinite alternate; }
@keyframes flip { from { transform: scaleX(1); } to { transform: scaleX(-1); opacity: .5; } }

/* ───── watermark while playing ───── */
#watermark { position: absolute; top: 40px; right: 56px; font-size: 22px; opacity: 0; transition: opacity .8s; }
#watermark.show { opacity: .55; }

/* ───── paused / seeking ───── */
.shade-bottom { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 40%, transparent 70%); }
.pause-icon { position: absolute; left: 50%; top: 42%; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: rgba(30,31,34,.9); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; }
.pause-icon svg { width: 54px; height: 54px; fill: #fff; }
#info.paused .pause-icon { opacity: 1; }
.info-body { position: absolute; left: 80px; right: 80px; bottom: 56px; display: flex; flex-direction: column; gap: 14px; transform: translateY(20px); transition: transform .5s ease; }
#info.show .info-body { transform: none; }
#info h1 { font-family: Outfit; font-weight: 800; font-size: 48px; }
#info p { font-size: 19px; color: rgba(255,255,255,.75); max-width: 900px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress { display: flex; align-items: center; gap: 20px; margin-top: 8px; font-size: 18px; font-variant-numeric: tabular-nums; }
.track { position: relative; flex: 1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.22); }
.fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--green); }
.thumb { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; left: 0; }

/* ───── buffering ───── */
#buffering { position: absolute; left: 50%; top: 50%; margin: -40px 0 0 -40px; width: 80px; height: 80px; border-radius: 50%; background: rgba(30,31,34,.85); display: none; align-items: center; justify-content: center; }
#buffering.show { display: flex; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── intro pill ───── */
.pill { position: absolute; left: 80px; bottom: 80px; display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-radius: 30px; background: rgba(30,31,34,.92); font-size: 19px; font-weight: 500; opacity: 0; transform: translateY(20px); transition: all .45s ease; }
.pill svg { width: 26px; height: 26px; fill: var(--green); }
.pill.show { opacity: 1; transform: none; }

/* ───── up next ───── */
#upnext { position: absolute; right: 56px; bottom: 64px; width: 460px; display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: 22px; background: rgba(22,22,24,.94); border: 1px solid rgba(255,255,255,.08); opacity: 0; transform: translateX(40px); transition: all .5s ease; }
#upnext.show { opacity: 1; transform: none; }
.thumb-wrap { position: relative; width: 190px; height: 107px; border-radius: 14px; overflow: hidden; flex: none; background: #222; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.count { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #000; font-family: Outfit; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.upnext-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.upnext-text small { color: var(--green); font-size: 16px; font-weight: 500; }
.upnext-text strong { font-family: Outfit; font-weight: 800; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext-text span { color: var(--muted); font-size: 16px; }
