/* PrimeToday Live TV — news channel look */
:root {
	--ptl-red: #d90429;
	--ptl-red-dark: #8d0219;
	--ptl-yellow: #ffd60a;
	--ptl-navy: #0b1d3a;
	--ptl-white: #ffffff;
	--ptl-font: "Mukta", "Nirmala UI", "Noto Sans Devanagari", "Mangal", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body.ptl { font-family: var(--ptl-font); color: var(--ptl-white); }

.ptl-stage { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(circle at 30% 20%, #1b3a6b, var(--ptl-navy) 60%, #050b16); }
.ptl-stage.is-idle { cursor: none; }

/* Background: promo video loop, or the news image with a slow Ken Burns zoom */
.ptl-video, .ptl-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ptl-video { object-fit: cover; transition: filter .6s; }
.ptl-bg { background-size: cover; background-position: center; opacity: .55; }
.ptl-bg.is-zoom { animation: ptl-kenburns 20s ease-out forwards; }
.has-video .ptl-bg { display: none; }
.ptl-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.55) 0, transparent 18%, transparent 45%, rgba(0,0,0,.85) 100%); transition: opacity .6s; }

/* Top bar */
.ptl-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 1.2vw; padding: 1.6vh 2vw; z-index: 3; transition: opacity .6s; }
.ptl-brand { display: flex; align-items: center; gap: .8vw; }
.ptl-brand img { height: 6vh; max-width: 18vw; object-fit: contain; }
.ptl-channel { font-size: clamp(18px, 2.2vw, 40px); font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.ptl-live { display: inline-flex; align-items: center; gap: .5em; background: var(--ptl-red); padding: .25em .8em; border-radius: 4px; font-weight: 800; font-size: clamp(13px, 1.2vw, 22px); letter-spacing: .1em; }
.ptl-dot { width: .6em; height: .6em; border-radius: 50%; background: #fff; animation: ptl-blink 1s steps(2, start) infinite; }
.ptl-clock { margin-left: auto; text-align: right; line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.ptl-clock strong { display: block; font-size: clamp(16px, 1.8vw, 34px); font-variant-numeric: tabular-nums; }
.ptl-clock span { font-size: clamp(11px, 1vw, 18px); opacity: .85; }

/* Anchor (cartoon SVG or Three.js canvas) on the right, story photo on the left, lower third in front */
.ptl-anchor { position: absolute; right: 1vw; bottom: 7.5vh; width: 42vw; height: 82vh; z-index: 1; pointer-events: none; transition: opacity .6s; }
.has-anchor .ptl-lower { max-width: 57vw; }
.has-anchor .ptl-pip { right: auto; left: 2.5vw; width: 28vw; transform: translateX(-120%) rotate(-4deg); }
.has-anchor .ptl-pip.is-in { transform: none; }
.ptl-anchor canvas, .ptl-anchor svg { width: 100% !important; height: 100% !important; display: block; }
.is-break .ptl-anchor { opacity: 0; }

/* Photo anchor: the studio picture fills the screen above the ticker; the story photo moves to the right */
.has-photo .ptl-anchor { left: 0; right: 0; top: 0; bottom: 7.5vh; width: auto; height: auto; }
.ptl-anchor .ptl-photo { width: 100% !important; height: 100% !important; display: block; }
.has-photo .ptl-pip { left: auto; right: 2.5vw; transform: translateX(120%) rotate(4deg); }
.has-photo .ptl-pip.is-in { transform: none; }
.has-photo .ptl-shade { z-index: 2; background: linear-gradient(to bottom, rgba(0,0,0,.45) 0, transparent 14%, transparent 55%, rgba(0,0,0,.55) 100%); pointer-events: none; }

/* Picture-in-picture news image */
.ptl-pip { position: absolute; right: 2.5vw; top: 17vh; width: 30vw; aspect-ratio: 16 / 10; margin: 0; border: 4px solid var(--ptl-white); border-radius: 6px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.6); opacity: 0; transform: translateX(120%) rotate(4deg); transition: transform .8s cubic-bezier(.2,.9,.2,1.15), opacity .5s; z-index: 2; }
.ptl-pip.is-in { opacity: 1; transform: none; }
.ptl-pip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lower third */
.ptl-lower { position: absolute; left: 2.5vw; right: 2.5vw; bottom: 12.5vh; z-index: 3; max-width: 70vw; }
.ptl-flash { display: inline-block; background: var(--ptl-yellow); color: #111; font-weight: 900; font-size: clamp(14px, 1.6vw, 30px); padding: .2em .8em; letter-spacing: .06em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%); animation: ptl-pulse .8s ease-in-out infinite alternate; margin-right: .4em; }
.ptl-tag { display: inline-block; background: var(--ptl-red); font-weight: 800; font-size: clamp(13px, 1.3vw, 24px); padding: .25em .9em; text-transform: uppercase; letter-spacing: .05em; }
.ptl-headline { margin: .25em 0 0; background: linear-gradient(90deg, rgba(11,29,58,.96), rgba(11,29,58,.82)); border-left: .35em solid var(--ptl-red); padding: .35em .6em; font-size: clamp(22px, 3.3vw, 64px); line-height: 1.2; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.ptl-excerpt { margin: 0; background: rgba(255,255,255,.95); color: #111; padding: .5em .9em; font-size: clamp(14px, 1.45vw, 28px); line-height: 1.4; max-height: 3.6em; overflow: hidden; }
.ptl-excerpt:empty { display: none; }

.ptl-word { display: inline-block; opacity: 0; transform: translateY(.6em); }
.ptl-lower.is-in .ptl-tag, .ptl-lower.is-in .ptl-flash { animation: ptl-wipe .5s ease-out both; }
.ptl-lower.is-in .ptl-flash { animation: ptl-wipe .5s ease-out both, ptl-pulse .8s .5s ease-in-out infinite alternate; }
.ptl-lower.is-in .ptl-headline { animation: ptl-slide .6s .1s cubic-bezier(.2,.9,.2,1) both; }
.ptl-lower.is-in .ptl-word { animation: ptl-word .45s ease-out forwards; }
.ptl-lower.is-in .ptl-excerpt { animation: ptl-rise .7s .9s ease-out both; }
.ptl-lower.is-out { opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .5s; }
.is-breaking .ptl-headline { border-left-color: var(--ptl-yellow); background: linear-gradient(90deg, rgba(141,2,25,.97), rgba(217,4,41,.85)); }

/* Story progress: runs all the time, shimmers while the voice is still loading */
.ptl-progress { position: absolute; left: 0; right: 0; bottom: 7.5vh; z-index: 4; pointer-events: none; transition: opacity .6s; }
.ptl-progress-track { height: 5px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.ptl-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--ptl-red), var(--ptl-yellow)); transition: width .25s linear; }
.ptl-progress.is-waiting .ptl-progress-bar { width: 35% !important; position: absolute; left: 0; top: 0; transition: none; animation: ptl-indeterminate 1.3s ease-in-out infinite; }
.ptl-progress-label { position: absolute; left: 2.5vw; bottom: 9px; background: rgba(0,0,0,.65); color: #fff; font: 700 clamp(11px, .9vw, 16px) var(--ptl-font); letter-spacing: .08em; text-transform: uppercase; padding: .3em .8em; border-radius: 3px; }
.ptl-progress-label::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--ptl-red); margin-right: .55em; vertical-align: .05em; }
.ptl-progress.is-waiting .ptl-progress-label::before { background: var(--ptl-yellow); animation: ptl-blink .6s steps(2, start) infinite; }

/* Bottom ticker */
.ptl-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 7.5vh; min-height: 40px; display: flex; background: var(--ptl-yellow); color: #111; z-index: 3; transition: opacity .6s; }
.ptl-ticker-label { flex: none; display: flex; align-items: center; padding: 0 1.4vw; background: var(--ptl-red); color: #fff; font-weight: 900; font-size: clamp(14px, 1.5vw, 28px); letter-spacing: .06em; clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%); padding-right: 2.2vw; }
.ptl-ticker-track { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ptl-ticker-move { display: inline-flex; white-space: nowrap; will-change: transform; }
.ptl-ticker-move.is-moving { animation: ptl-marquee linear infinite; }
.ptl-ticker-item { font-size: clamp(15px, 1.7vw, 32px); font-weight: 700; padding: 0 1.2em; }
.ptl-ticker-item::before { content: "◆"; color: var(--ptl-red); margin-right: 1.2em; font-size: .7em; vertical-align: middle; }

/* Promo break: video takes the full screen, overlays fade out */
.is-break .ptl-lower, .is-break .ptl-pip, .is-break .ptl-shade { opacity: 0; pointer-events: none; }
.is-break .ptl-top { opacity: .0; }

/* Video ads: full screen above the studio, the ticker stays visible below */
.ptl-ad { position: absolute; left: 0; right: 0; top: 0; bottom: 7.5vh; z-index: 4; background: #000; }
.ptl-ad[hidden] { display: none; }
.ptl-ad-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ptl-ad-bar { position: absolute; left: 2vw; top: 2vh; display: flex; gap: 10px; align-items: center; }
.ptl-ad-label { background: var(--ptl-yellow); color: #111; font-weight: 900; font-size: clamp(12px, 1.1vw, 20px); letter-spacing: .08em; text-transform: uppercase; padding: .3em .8em; border-radius: 3px; }
.ptl-ad-count { background: rgba(0,0,0,.6); color: #fff; font-weight: 700; font-size: clamp(12px, 1vw, 18px); padding: .3em .8em; border-radius: 3px; font-variant-numeric: tabular-nums; }
.ptl-ad-count:empty { display: none; }
.ptl-ad-cta, .ptl-ad-skip { position: absolute; bottom: 4vh; border-radius: 4px; font: 700 clamp(13px, 1.1vw, 20px) var(--ptl-font); padding: .7em 1.4em; cursor: pointer; text-decoration: none; }
.ptl-ad-cta { left: 2vw; background: var(--ptl-red); color: #fff; border: 0; }
.ptl-ad-skip { right: 2vw; background: rgba(0,0,0,.7); color: #fff; border: 1px solid rgba(255,255,255,.6); }
.ptl-ad-skip:disabled { cursor: default; opacity: .75; }
.ptl-ad-cta[hidden], .ptl-ad-skip[hidden] { display: none; }
.is-ad .ptl-progress { z-index: 5; }
.is-ad .ptl-progress-label { display: none; }
.is-ad .ptl-start { display: none; }

/* Controls */
.ptl-controls { position: absolute; right: 2vw; top: 11vh; z-index: 5; display: flex; gap: 8px; transition: opacity .4s; }
.ptl-controls button { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font: 700 13px var(--ptl-font); letter-spacing: .04em; padding: 8px 16px; cursor: pointer; }
.ptl-controls button:hover { background: rgba(0,0,0,.8); }
.ptl-controls #ptl-sound.is-on { background: var(--ptl-red); border-color: var(--ptl-red); }
.is-idle .ptl-controls { opacity: 0; }

.ptl-start { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 6; display: flex; align-items: center; gap: 14px; border: 0; border-radius: 999px; padding: 16px 28px; background: var(--ptl-red); color: #fff; font: 700 clamp(15px, 1.4vw, 22px) var(--ptl-font); cursor: pointer; box-shadow: 0 0 0 0 rgba(217,4,41,.7); animation: ptl-ring 1.6s infinite; }
.ptl-start-dot { width: 0; height: 0; border-style: solid; border-width: .5em 0 .5em .85em; border-color: transparent transparent transparent #fff; }
.ptl-start.is-hidden { display: none; }

@keyframes ptl-blink { to { visibility: hidden; } }
@keyframes ptl-pulse { from { filter: brightness(1); } to { filter: brightness(1.25); transform: scale(1.03); } }
@keyframes ptl-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ptl-slide { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes ptl-word { to { opacity: 1; transform: none; } }
@keyframes ptl-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes ptl-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ptl-kenburns { from { transform: scale(1); } to { transform: scale(1.15) translate(-2%, -2%); } }
@keyframes ptl-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@keyframes ptl-ring { 70% { box-shadow: 0 0 0 22px rgba(217,4,41,0); } 100% { box-shadow: 0 0 0 0 rgba(217,4,41,0); } }

/* Phones / portrait */
@media (max-width: 760px), (orientation: portrait) {
	.ptl-pip { width: 60vw; left: 50%; right: auto; top: 12vh; transform: translate(-50%, -40px); }
	.ptl-pip.is-in { transform: translate(-50%, 0); }
	.ptl-lower { max-width: none; bottom: 12vh; }
	.ptl-clock span { display: none; }
	.ptl-anchor { left: 0; right: 0; width: 100vw; height: 62vh; bottom: auto; top: 8vh; }
	.has-anchor .ptl-lower { max-width: none; }
	.has-photo .ptl-anchor { top: 0; height: auto; bottom: 7.5vh; }
	.ptl-stage.has-photo .ptl-pip { top: auto; bottom: 28vh; left: 3vw; right: auto; width: 40vw; transform: translateX(-130%); }
	.ptl-stage.has-photo .ptl-pip.is-in { transform: none; }
	.has-anchor .ptl-pip { width: 34vw; left: auto; right: 3vw; top: 14vh; transform: translateX(140%); }
	.has-anchor .ptl-pip.is-in { transform: none; }
	.has-anchor .ptl-pip.is-in { transform: none; }
	.ptl-controls { top: 7.5vh; }
	.ptl-controls button { padding: 6px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.ptl-word { opacity: 1; transform: none; }
	.ptl-lower.is-in *, .ptl-bg.is-zoom { animation: none !important; }
}
