@font-face { font-family: 'Montserrat'; src: url(assets/fonts/Montserrat.ttf); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Noto Sans Telugu'; src: url(assets/fonts/NotoSansTelugu.ttf); font-weight: 100 900; font-display: swap; }
:root { --evg: #0F1918; --cream: #F6F1E4; --gold: #DCAA39; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--cream); font-family: Montserrat, system-ui, sans-serif; overflow: hidden; }
#stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; margin: auto; top: 50%; transform: translateY(-50%); container-type: inline-size; background: #000; }
canvas { width: 100%; height: 100%; display: block; }
.subs { position: absolute; left: 50%; bottom: 5.5cqw; transform: translateX(-50%); width: 86%; text-align: center; opacity: 0; pointer-events: none; text-shadow: 0 0.12cqw 0.5cqw rgba(0,0,0,.85), 0 0 0.2cqw rgba(0,0,0,.9); }
.subs .who { font-size: 1.05cqw; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: .4cqw; }
.subs .who:empty { display: none; }
.subs .en { font-size: 2.05cqw; font-weight: 600; line-height: 1.25; }
.subs .te { font-family: 'Noto Sans Telugu', sans-serif; font-size: 1.9cqw; font-weight: 500; line-height: 1.5; color: #f3e3b8; margin-top: .25cqw; }
.subs.place { bottom: auto; top: 4.2cqw; left: 4cqw; transform: none; width: auto; max-width: 60%; text-align: left; }
.subs.place .en { font-size: 1.35cqw; font-weight: 600; letter-spacing: .02em; }
.subs.place .te { font-size: 1.3cqw; }
#end { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, #183230 0%, var(--evg) 70%); opacity: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
#end p, #end h1, #end div { margin: 0; opacity: 0; }
#end .tag { font-size: 2.2cqw; font-weight: 600; }
#end .tag.te { font-family: 'Noto Sans Telugu'; font-size: 2cqw; color: #f3e3b8; margin-top: .3cqw; margin-bottom: 2.6cqw; }
#end h1 { font-size: 4.6cqw; font-weight: 800; letter-spacing: -.01em; }
#end h1 .by { font-weight: 500; font-size: 2.4cqw; color: var(--cream); opacity: .85; }
#end .eng { font-size: 1.5cqw; margin-top: .6cqw; color: #cfd6d2; }
#end .eng b { color: var(--gold); font-weight: 700; }
#end .olrt { display: flex; align-items: center; gap: 0; margin-top: 2.6cqw; }
#end .olrt .pw { font-size: 1.3cqw; letter-spacing: .2em; text-transform: uppercase; color: #aab4b0; }
#end .olrt img { width: 34cqw; height: auto; display: block; margin: -5.5cqw -4cqw -5.5cqw -6cqw; }
#end .cta { margin-top: 2.4cqw; font-size: 1.7cqw; font-weight: 700; color: var(--evg); background: var(--gold); padding: .7cqw 2.2cqw; border-radius: 3cqw; }
#end .cta span { font-weight: 600; }
#end .note { position: absolute; bottom: 2cqw; font-size: .95cqw; color: #8f9b97; }
.status { position: absolute; inset: auto 0 45% 0; text-align: center; font-size: 1.4cqw; color: #cfc6b0; }
.big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .8cqw; border: 0; border-radius: 4cqw; padding: 1.2cqw 2.6cqw; background: var(--gold); color: var(--evg); font: 700 1.8cqw Montserrat, sans-serif; cursor: pointer; box-shadow: 0 .4cqw 2cqw rgba(0,0,0,.4); }
.big svg { width: 2.2cqw; height: 2.2cqw; fill: currentColor; }
.big[data-state=replay] span::after { content: ' again'; }
.big[hidden] { display: none; }
.ctrl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 1cqw; padding: .8cqw 1.4cqw; background: linear-gradient(transparent, rgba(0,0,0,.45)); opacity: 0; transition: opacity .3s; }
#stage:hover .ctrl, #stage:focus-within .ctrl, .ctrl:focus-within { opacity: 1; }
body:not(.ready) .ctrl { display: none; }
.ctrl button { width: 2.6cqw; height: 2.6cqw; min-width: 36px; min-height: 36px; border: 0; border-radius: 50%; background: rgba(246,241,228,.92); cursor: pointer; position: relative; }
.ctrl button::before { content: ''; position: absolute; inset: 0; margin: auto; width: 40%; height: 40%; background: var(--evg); clip-path: polygon(15% 0, 100% 50%, 15% 100%); }
.ctrl button[data-state=pause]::before { clip-path: polygon(10% 0, 38% 0, 38% 100%, 10% 100%, 10% 0, 62% 0, 90% 0, 90% 100%, 62% 100%, 62% 0); }
.ctrl button[data-state=replay]::before { clip-path: none; border-radius: 50%; border: 3px solid var(--evg); background: transparent; border-right-color: transparent; }
.track { flex: 1; height: 4px; background: rgba(246,241,228,.25); border-radius: 2px; overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--gold); }
body.capture .ctrl, body.capture .big, body.capture .status { display: none !important; }
@media (prefers-reduced-motion: reduce) { .ctrl { transition: none; } }
