/* =====================================================================
 * AZF Showreel — front-end stylesheet
 * Dark, cinematic, Netflix-style UI. Scoped under .azf-sr-body.
 * Driven by CSS custom properties emitted by the plugin (accent/bg/fonts).
 * ===================================================================== */

/* ------------------------------------------------------------------ *
 * 1. Tokens & reset
 * ------------------------------------------------------------------ */
.azf-sr-body {
	--azf-accent: #E6B450;
	--azf-accent-rgb: 230, 180, 80;
	--azf-bg: #0A0A0A;
	--azf-fg: #FFFFFF;
	--azf-font-display: 'Anton', Oswald, 'Arial Narrow', sans-serif;
	--azf-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	--azf-muted: rgba(255, 255, 255, .62);
	--azf-faint: rgba(255, 255, 255, .42);
	--azf-line: rgba(255, 255, 255, .14);
	--azf-surface: #141414;
	--azf-surface-2: #1c1c1c;
	--azf-radius: 6px;
	--azf-nav-h: 72px;
	--azf-ease: cubic-bezier(.2, .7, .2, 1);

	margin: 0;
	background: var(--azf-bg);
	color: var(--azf-fg);
	font-family: var(--azf-font-body);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

.azf-sr-body * ,
.azf-sr-body *::before,
.azf-sr-body *::after { box-sizing: border-box; }

.azf-sr-body img,
.azf-sr-body video { max-width: 100%; display: block; }

.azf-sr-body a { color: inherit; text-decoration: none; }

.azf-sr-body button {
	font-family: inherit;
	color: inherit;
	cursor: pointer;
	border: 0;
	background: none;
}

.azf-sr-body h1, .azf-sr-body h2, .azf-sr-body h3, .azf-sr-body p { margin: 0; }

.azf-sr-body ul { margin: 0; padding: 0; list-style: none; }

.azf-sr-body :focus-visible {
	outline: 2px solid var(--azf-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.azf-sr-body.azf-no-scroll { overflow: hidden; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	clip: rect(0 0 0 0); clip-path: inset(50%);
	overflow: hidden; white-space: nowrap;
}

.azf-skip-link {
	position: fixed; top: -60px; left: 12px; z-index: 1000;
	background: var(--azf-fg); color: #000; padding: 10px 16px; border-radius: 4px;
	transition: top .2s var(--azf-ease);
}
.azf-skip-link:focus { top: 12px; }

/* Hide scrollbars on tracks/panels but keep scrollability. */
.azf-row-track,
.azf-modal-panel { scrollbar-width: none; -ms-overflow-style: none; }
.azf-row-track::-webkit-scrollbar,
.azf-modal-panel::-webkit-scrollbar { display: none; }

/* ------------------------------------------------------------------ *
 * 2. Shared atoms
 * ------------------------------------------------------------------ */
.azf-ico { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }

.azf-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	padding: 12px 26px; border-radius: 5px;
	font-weight: 700; font-size: 15px; letter-spacing: .02em;
	background: var(--azf-fg); color: #000;
	transition: transform .15s var(--azf-ease), background .2s, opacity .2s;
	white-space: nowrap;
}
.azf-btn:hover { background: rgba(255, 255, 255, .82); transform: translateY(-1px); }
.azf-btn svg { width: 22px; height: 22px; fill: currentColor; }
.azf-btn-info { background: rgba(109, 109, 110, .55); color: var(--azf-fg); }
.azf-btn-info:hover { background: rgba(109, 109, 110, .42); }
.azf-btn-ghost { background: transparent; color: var(--azf-fg); border: 1px solid var(--azf-line); }
.azf-btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.azf-icon-btn {
	width: 42px; height: 42px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .5);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--azf-fg); transition: border-color .2s, background .2s;
}
.azf-icon-btn:hover { border-color: var(--azf-fg); background: rgba(255, 255, 255, .1); }
.azf-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

.azf-pill {
	display: inline-flex; align-items: center;
	padding: 3px 10px; border-radius: 3px; font-size: 13px;
	background: rgba(255, 255, 255, .12); color: var(--azf-fg);
	letter-spacing: .02em;
}
.azf-pill-ghost { background: transparent; border: 1px solid var(--azf-line); color: var(--azf-muted); }

.azf-stars { color: var(--azf-accent); letter-spacing: 2px; font-size: 15px; }

/* ------------------------------------------------------------------ *
 * 3. Top navigation
 * ------------------------------------------------------------------ */
.azf-nav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 60;
	height: var(--azf-nav-h);
	display: flex; align-items: center; gap: 28px;
	padding: 0 clamp(16px, 4vw, 48px);
	background: linear-gradient(180deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 100%);
	transition: background .3s var(--azf-ease);
}
.azf-nav.is-scrolled { background: rgba(8, 8, 8, .96); border-bottom: 1px solid var(--azf-line); }

.azf-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.azf-logo img { height: clamp(28px, 3.4vw, 40px); width: auto; }
.azf-logo-text { font-family: var(--azf-font-display); font-size: 26px; letter-spacing: .04em; }

.azf-tabs-nav { display: flex; align-items: center; gap: 22px; flex: 1 1 auto; }
.azf-tab-link {
	position: relative; font-size: 13px; font-weight: 600;
	text-transform: uppercase; letter-spacing: .14em; color: var(--azf-muted);
	padding: 6px 0; transition: color .2s;
}
.azf-tab-link:hover { color: var(--azf-fg); }
.azf-tab-link.is-active { color: var(--azf-fg); }
.azf-tab-link.is-active::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
	background: var(--azf-accent);
}

.azf-nav-right { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }

.azf-search { position: relative; }
.azf-search-input {
	width: 0; min-width: 0; padding: 9px 14px 9px 36px;
	background: rgba(0, 0, 0, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 10-.7.7l.27.28v.79l5 4.99L20.49 19zm-6 0A4.5 4.5 0 1114 9.5 4.5 4.5 0 019.5 14z'/%3E%3C/svg%3E") no-repeat 10px center / 16px;
	border: 1px solid transparent; border-radius: 4px; color: var(--azf-fg);
	font-size: 14px; opacity: .8; transition: width .3s var(--azf-ease), border-color .2s, opacity .2s;
}
.azf-search-input:focus, .azf-search-input.is-open { width: 220px; border-color: var(--azf-line); opacity: 1; outline: none; }
.azf-search-input::placeholder { color: var(--azf-faint); }

.azf-clock { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.azf-clock-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--azf-muted); }
.azf-clock-time { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ------------------------------------------------------------------ *
 * 4. Hero billboard
 * ------------------------------------------------------------------ */
.azf-hero {
	position: relative; min-height: min(88vh, 820px);
	display: flex; align-items: flex-end;
	padding: 0 clamp(16px, 4vw, 48px) clamp(40px, 7vh, 90px);
	overflow: hidden;
}
.azf-hero-media { position: absolute; inset: 0; z-index: 0; }
.azf-hero-backdrop { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.azf-hero-scrim {
	position: absolute; inset: 0;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .55) 36%, rgba(0, 0, 0, 0) 70%),
		linear-gradient(0deg, var(--azf-bg) 2%, rgba(10, 10, 10, .25) 32%, rgba(0, 0, 0, 0) 60%);
}
.azf-hero-inner { position: relative; z-index: 1; max-width: 640px; }
.azf-hero-eyebrow {
	display: flex; align-items: center; gap: 10px;
	font-size: 13px; text-transform: uppercase; letter-spacing: .18em; color: var(--azf-muted);
	margin-bottom: 18px;
}
.azf-hero-eyebrow .azf-mark { color: var(--azf-accent); font-size: 11px; }
.azf-hero-title {
	font-family: var(--azf-font-display); font-weight: 400;
	font-size: clamp(48px, 8vw, 116px); line-height: .86; letter-spacing: .005em;
	text-transform: uppercase; margin: 0 0 6px;
}
.azf-hero-logo { max-width: min(540px, 70vw); max-height: 200px; width: auto; margin-bottom: 6px; }
.azf-hero-rowmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 14px; }
.azf-hero-synopsis { font-size: clamp(15px, 1.4vw, 18px); color: rgba(255, 255, 255, .86); max-width: 560px; margin-bottom: 26px; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.azf-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------------ *
 * 5. Rows / carousels
 * ------------------------------------------------------------------ */
.azf-browse { position: relative; z-index: 2; margin-top: -4vh; padding-bottom: 40px; }
.azf-row { margin: 0 0 clamp(26px, 4vh, 46px); }
.azf-row-title {
	font-family: var(--azf-font-display); font-weight: 400;
	font-size: clamp(20px, 2.4vw, 30px); text-transform: uppercase; letter-spacing: .04em;
	color: var(--azf-fg); margin: 0 0 14px; padding: 0 clamp(16px, 4vw, 48px);
}
.azf-row-viewport { position: relative; }
.azf-row-track {
	display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden;
	padding: 6px clamp(16px, 4vw, 48px) 14px;
	scroll-snap-type: x proximity; scroll-behavior: smooth;
	scroll-padding-left: clamp(16px, 4vw, 48px);
}
.azf-card-wrap { scroll-snap-align: start; flex: 0 0 auto; }

.azf-row-arrow {
	position: absolute; top: 6px; bottom: 14px; z-index: 5; width: clamp(28px, 4vw, 48px);
	display: none; align-items: center; justify-content: center;
	background: rgba(8, 8, 8, .6); color: var(--azf-fg);
	opacity: 0; transition: opacity .2s, background .2s;
}
.azf-row-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.azf-row-arrow.azf-row-prev { left: 0; }
.azf-row-arrow.azf-row-next { right: 0; }
.azf-row-arrow:hover { background: rgba(8, 8, 8, .85); }
.azf-row-arrow.is-visible { display: flex; }
.azf-row-viewport:hover .azf-row-arrow.is-visible { opacity: 1; }

/* ------------------------------------------------------------------ *
 * 6. Cards
 * ------------------------------------------------------------------ */
.azf-card {
	position: relative; display: block; width: clamp(140px, 15vw, 210px);
	border-radius: var(--azf-radius); transition: transform .28s var(--azf-ease);
	transform-origin: center; will-change: transform;
}
.azf-card-poster {
	position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden;
	border-radius: var(--azf-radius); background: var(--azf-surface-2);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}
.azf-card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--azf-ease); }
.azf-card-noart {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	padding: 12px; text-align: center; font-family: var(--azf-font-display); font-size: 20px;
	text-transform: uppercase; color: var(--azf-faint);
	background: linear-gradient(150deg, #222, #111);
}
.azf-card-badge {
	position: absolute; top: 8px; left: 8px; z-index: 3;
	padding: 3px 8px; border-radius: 3px; font-size: 10px; font-weight: 800;
	letter-spacing: .12em; text-transform: uppercase;
	background: var(--azf-accent); color: #1a1300;
}
.azf-card-play {
	position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity .25s;
}
.azf-card-play svg { width: 48px; height: 48px; fill: rgba(255, 255, 255, .95); filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); }
.azf-card-info {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	padding: 26px 12px 12px; display: flex; flex-direction: column; gap: 3px;
	background: linear-gradient(0deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0));
	opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
	border-radius: 0 0 var(--azf-radius) var(--azf-radius);
}
.azf-card-title { font-weight: 700; font-size: 14px; line-height: 1.2; }
.azf-card-sub { font-size: 11.5px; color: var(--azf-muted); letter-spacing: .02em; }

/* Hover preview (desktop, opt-in via body class) */
.azf-sr-body.azf-hover-preview .azf-card:hover {
	transform: scale(1.12); z-index: 8;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
.azf-sr-body.azf-hover-preview .azf-card:hover .azf-card-poster { box-shadow: 0 0 0 2px rgba(var(--azf-accent-rgb), .9); }
.azf-card:hover .azf-card-play,
.azf-card:focus-visible .azf-card-play { opacity: 1; }
.azf-card:hover .azf-card-info,
.azf-card:focus-visible .azf-card-info { opacity: 1; transform: translateY(0); }
.azf-card .azf-card-trailer {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	z-index: 1; opacity: 0; transition: opacity .4s;
}
.azf-card .azf-card-trailer.is-playing { opacity: 1; }

/* ------------------------------------------------------------------ *
 * 7. Grid (filter / search view)
 * ------------------------------------------------------------------ */
.azf-grid-section { padding: calc(var(--azf-nav-h) + 28px) clamp(16px, 4vw, 48px) 60px; min-height: 60vh; }
.azf-grid-title {
	font-family: var(--azf-font-display); font-weight: 400; text-transform: uppercase;
	font-size: clamp(26px, 4vw, 48px); letter-spacing: .03em; margin-bottom: 24px;
}
.azf-grid {
	display: grid; gap: clamp(10px, 1.4vw, 18px);
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.azf-grid .azf-card { width: 100%; }
.azf-grid .azf-card-wrap { width: 100%; }
.azf-grid-empty { color: var(--azf-muted); font-size: 17px; padding: 40px 0; }

/* ------------------------------------------------------------------ *
 * 8. Detail modal
 * ------------------------------------------------------------------ */
.azf-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; }
.azf-modal[hidden] { display: none; }
.azf-modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(4px); }
.azf-modal-panel {
	position: relative; z-index: 1; width: min(920px, 94vw); margin: 3.5vh 0 6vh;
	background: var(--azf-surface); border-radius: 10px; overflow: hidden auto;
	max-height: 92vh; box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
	animation: azf-modal-in .32s var(--azf-ease);
}
@keyframes azf-modal-in { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }

.azf-modal-close {
	position: absolute; top: 16px; right: 16px; z-index: 5;
	width: 38px; height: 38px; border-radius: 50%;
	background: rgba(10, 10, 10, .8); color: var(--azf-fg);
	display: flex; align-items: center; justify-content: center;
}
.azf-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.azf-modal-close:hover { background: #000; }

.azf-modal-hero { position: relative; aspect-ratio: 16 / 9; background: #000; }
.azf-modal-backdrop { width: 100%; height: 100%; object-fit: cover; }
.azf-modal-trailer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.azf-modal-hero-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, var(--azf-surface) 1%, rgba(20, 20, 20, .3) 28%, rgba(0, 0, 0, 0) 55%); }
.azf-modal-hero-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 clamp(20px, 3vw, 42px) clamp(18px, 3vh, 30px); }
.azf-modal-logo { max-width: 56%; max-height: 130px; margin-bottom: 14px; }
.azf-modal-title {
	font-family: var(--azf-font-display); font-weight: 400; text-transform: uppercase;
	font-size: clamp(28px, 4.5vw, 56px); line-height: .9; letter-spacing: .01em; margin-bottom: 18px;
}
.azf-modal-actions { display: flex; align-items: center; gap: 12px; }

.azf-modal-body {
	display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(20px, 3vw, 40px);
	padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 42px);
}
.azf-modal-metarow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 14px; color: var(--azf-muted); }
.azf-modal-metarow .azf-match { color: var(--azf-accent); font-weight: 700; }
.azf-modal-metarow .azf-format-tag { border: 1px solid var(--azf-line); padding: 1px 7px; border-radius: 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.azf-modal-synopsis { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .9); }

.azf-modal-facts { display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.azf-modal-facts .azf-fact dt, .azf-modal-fact-label { color: var(--azf-faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.azf-modal-fact { }
.azf-modal-fact-value { color: rgba(255, 255, 255, .92); }
.azf-modal-fact-value a { color: var(--azf-accent); }
.azf-modal-fact-value .azf-tag-link { color: rgba(255,255,255,.9); }
.azf-modal-fact-value .azf-tag-link:not(:last-child)::after { content: ", "; color: var(--azf-faint); }
.azf-modal-awards { list-style: none; }
.azf-modal-awards li { position: relative; padding-left: 18px; margin-bottom: 4px; color: rgba(255,255,255,.9); }
.azf-modal-awards li::before { content: "🏆"; position: absolute; left: 0; font-size: 12px; }
.azf-modal-credits { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.azf-modal-credits dt { color: var(--azf-faint); }
.azf-modal-credits dd { margin: 0; }

/* Episodes */
.azf-modal-episodes { grid-column: 1 / -1; border-top: 1px solid var(--azf-line); padding-top: 22px; margin-top: 6px; }
.azf-modal-ep-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.azf-modal-ep-head h3 { font-family: var(--azf-font-display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .03em; }
.azf-modal-seasons { display: flex; gap: 8px; }
.azf-season-btn { padding: 6px 12px; border: 1px solid var(--azf-line); border-radius: 4px; font-size: 13px; color: var(--azf-muted); }
.azf-season-btn.is-active { background: var(--azf-fg); color: #000; border-color: var(--azf-fg); }
.azf-modal-ep-list { display: flex; flex-direction: column; }
.azf-ep {
	display: grid; grid-template-columns: 36px 152px 1fr auto; align-items: center; gap: 16px;
	padding: 14px 8px; border-top: 1px solid rgba(255, 255, 255, .08); cursor: pointer;
	border-radius: 6px; transition: background .2s; text-align: left; width: 100%;
}
.azf-ep:hover { background: rgba(255, 255, 255, .06); }
.azf-ep-num { font-size: 20px; color: var(--azf-muted); text-align: center; }
.azf-ep-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #000; }
.azf-ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.azf-ep-thumb .azf-ep-playicon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.3); }
.azf-ep-thumb .azf-ep-playicon svg { width: 30px; height: 30px; fill: #fff; }
.azf-ep:hover .azf-ep-playicon { opacity: 1; }
.azf-ep-main { min-width: 0; }
.azf-ep-title { font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.azf-ep-dur { color: var(--azf-muted); font-size: 13px; font-weight: 400; }
.azf-ep-syn { font-size: 13.5px; color: var(--azf-muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Related */
.azf-modal-related { padding: 0 clamp(20px, 3vw, 42px) clamp(24px, 3vw, 38px); }
.azf-modal-related-title { font-family: var(--azf-font-display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .03em; margin-bottom: 16px; }
.azf-modal-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }

/* ------------------------------------------------------------------ *
 * 9. Player overlay
 * ------------------------------------------------------------------ */
.azf-player { position: fixed; inset: 0; z-index: 100; background: #000; }
.azf-player[hidden] { display: none; }
.azf-player-stage { position: relative; width: 100%; height: 100%; overflow: hidden; }
.azf-player-video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.azf-player-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.azf-player-spinner span {
	width: 54px; height: 54px; border-radius: 50%;
	border: 4px solid rgba(255, 255, 255, .2); border-top-color: var(--azf-accent);
	animation: azf-spin 1s linear infinite;
}
@keyframes azf-spin { to { transform: rotate(360deg); } }

.azf-player-bigplay {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 92px; height: 92px; border-radius: 50%;
	background: rgba(0, 0, 0, .5); border: 2px solid rgba(255, 255, 255, .8);
	display: flex; align-items: center; justify-content: center; transition: transform .2s, background .2s;
}
.azf-player-bigplay:hover { background: rgba(0, 0, 0, .7); transform: translate(-50%, -50%) scale(1.06); }
.azf-player-bigplay svg { width: 44px; height: 44px; fill: #fff; margin-left: 4px; }
.azf-player.is-playing .azf-player-bigplay { display: none; }

.azf-player-error {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	text-align: center; max-width: 80%;
}
.azf-player-error-msg { font-size: 18px; margin-bottom: 18px; color: rgba(255, 255, 255, .9); }
.azf-player-error-actions { display: flex; gap: 12px; justify-content: center; }

.azf-player-gradient {
	position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none;
	background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
	opacity: 1; transition: opacity .3s;
}

.azf-player-top {
	position: absolute; top: 0; left: 0; right: 0; z-index: 4;
	display: flex; align-items: center; gap: 16px; padding: 18px clamp(16px, 3vw, 36px);
	background: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
	transition: opacity .3s, transform .3s;
}
.azf-player-close { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.4); }
.azf-player-close svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; }
.azf-player-close:hover { background: rgba(0,0,0,.7); }
.azf-player-title { font-family: var(--azf-font-display); font-weight: 400; font-size: clamp(18px, 2.4vw, 28px); text-transform: uppercase; letter-spacing: .03em; }

.azf-player-controls {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
	padding: 0 clamp(16px, 3vw, 36px) 18px;
	transition: opacity .3s, transform .3s;
}

/* Idle / autohide */
.azf-player.is-idle .azf-player-controls,
.azf-player.is-idle .azf-player-top,
.azf-player.is-idle .azf-player-gradient { opacity: 0; }
.azf-player.is-idle .azf-player-top { transform: translateY(-10px); }
.azf-player.is-idle .azf-player-controls { transform: translateY(10px); }
.azf-player.is-idle .azf-player-stage { cursor: none; }

/* Seek bar */
.azf-seek { padding: 12px 0; cursor: pointer; }
.azf-seek-track { position: relative; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .28); transition: height .15s; }
.azf-seek:hover .azf-seek-track { height: 6px; }
.azf-seek-buffered { position: absolute; top: 0; left: 0; height: 100%; width: 0; background: rgba(255, 255, 255, .4); border-radius: 3px; }
.azf-seek-played { position: absolute; top: 0; left: 0; height: 100%; width: 0; background: var(--azf-accent); border-radius: 3px; }
.azf-seek-thumb {
	position: absolute; right: -7px; top: 50%; transform: translateY(-50%) scale(0);
	width: 14px; height: 14px; border-radius: 50%; background: var(--azf-accent); transition: transform .15s;
}
.azf-seek:hover .azf-seek-thumb { transform: translateY(-50%) scale(1); }
.azf-seek-tip {
	position: absolute; bottom: 22px; transform: translateX(-50%);
	background: rgba(0,0,0,.85); color: #fff; padding: 3px 8px; border-radius: 4px;
	font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap;
}

/* Control bar */
.azf-player-bar { display: flex; align-items: center; gap: 14px; }
.azf-pc { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .2s, transform .15s; }
.azf-pc:hover { background: rgba(255, 255, 255, .14); }
.azf-pc:active { transform: scale(.92); }
.azf-pc svg { width: 24px; height: 24px; fill: #fff; }
.azf-pc-play svg { width: 28px; height: 28px; }
.azf-player-spacer { flex: 1 1 auto; }
.azf-player-time { font-size: 14px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .9); white-space: nowrap; }
.azf-player-eptitle { font-size: 14px; color: var(--azf-muted); max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.azf-pc-volume { display: flex; align-items: center; }
.azf-pc-vol-range {
	width: 0; opacity: 0; height: 4px; margin-left: 0;
	-webkit-appearance: none; appearance: none; background: rgba(255, 255, 255, .3); border-radius: 3px;
	transition: width .25s var(--azf-ease), opacity .25s, margin-left .25s; cursor: pointer; vertical-align: middle;
}
.azf-pc-volume:hover .azf-pc-vol-range,
.azf-pc-vol-range:focus-visible { width: 78px; opacity: 1; margin-left: 6px; }
.azf-pc-vol-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.azf-pc-vol-range::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }

/* Menus (speed / quality) */
.azf-menu { position: relative; }
.azf-menu-list {
	position: absolute; bottom: calc(100% + 10px); right: 0; min-width: 132px;
	background: rgba(20, 20, 20, .98); border: 1px solid var(--azf-line); border-radius: 8px;
	padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
}
.azf-menu-list[hidden] { display: none; }
.azf-menu-list li { }
.azf-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 5px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.azf-menu-item:hover { background: rgba(255, 255, 255, .1); }
.azf-menu-item.is-active { color: var(--azf-accent); font-weight: 600; }
.azf-menu-item.is-active::before { content: "✓"; }
.azf-menu-item:not(.is-active)::before { content: ""; width: 12px; display: inline-block; }

/* Next-episode prompt */
.azf-player-next { position: absolute; right: clamp(16px, 3vw, 36px); bottom: 96px; z-index: 6; }
.azf-player-next[hidden] { display: none; }
.azf-player-next-card { background: rgba(20, 20, 20, .96); border: 1px solid var(--azf-line); border-radius: 10px; padding: 16px 18px; width: 300px; }
.azf-player-next-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--azf-muted); }
.azf-player-next-title { display: block; font-weight: 700; font-size: 16px; margin: 6px 0 12px; }
.azf-player-next-actions { display: flex; gap: 10px; }
.azf-player-next .azf-btn { padding: 9px 16px; font-size: 14px; }

/* ------------------------------------------------------------------ *
 * 10. Footer / empty / misc
 * ------------------------------------------------------------------ */
.azf-foot { padding: 40px clamp(16px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; align-items: center; border-top: 1px solid var(--azf-line); }
.azf-foot-social { display: flex; gap: 22px; }
.azf-foot-link { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--azf-muted); transition: color .2s; }
.azf-foot-link:hover { color: var(--azf-fg); }
.azf-foot-text { font-size: 13px; color: var(--azf-faint); }

.azf-empty { text-align: center; padding: clamp(80px, 16vh, 160px) 20px; }
.azf-empty-title { font-family: var(--azf-font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(32px, 6vw, 64px); margin-bottom: 12px; }
.azf-empty p { color: var(--azf-muted); margin-bottom: 24px; }

/* ------------------------------------------------------------------ *
 * 11. Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.azf-hero { min-height: 70vh; }
	.azf-modal-body { grid-template-columns: 1fr; }
	.azf-ep { grid-template-columns: 28px 120px 1fr; }
	.azf-ep-dur { display: block; }
}

@media (max-width: 680px) {
	.azf-sr-body { font-size: 15px; }
	.azf-nav { gap: 14px; padding: 0 16px; }
	.azf-tabs-nav { gap: 14px; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; }
	.azf-tabs-nav::-webkit-scrollbar { display: none; }
	.azf-tab-link { font-size: 12px; letter-spacing: .1em; white-space: nowrap; }
	.azf-clock { display: none; }
	.azf-search-input.is-open, .azf-search-input:focus { width: 150px; }

	.azf-hero { min-height: 76vh; align-items: flex-end; padding-bottom: 30px; }
	.azf-hero-scrim { background: linear-gradient(0deg, var(--azf-bg) 6%, rgba(10,10,10,.4) 38%, rgba(0,0,0,.1) 70%); }
	.azf-hero-inner { max-width: 100%; }
	.azf-hero-actions .azf-btn { flex: 1 1 auto; }

	.azf-card { width: 40vw; }
	.azf-row-arrow { display: none !important; }

	.azf-modal-panel { width: 100vw; margin: 0; max-height: 100vh; border-radius: 0; min-height: 100vh; }
	.azf-modal-logo { max-width: 70%; }
	.azf-ep { grid-template-columns: 26px 1fr; }
	.azf-ep-thumb { display: none; }

	.azf-player-eptitle { display: none; }
	.azf-pc-back, .azf-pc-fwd { display: none; }
	.azf-player-bar { gap: 8px; }
	.azf-player-next { left: 16px; right: 16px; bottom: 88px; }
	.azf-player-next-card { width: auto; }
}

@media (min-width: 1600px) {
	.azf-hero-inner { max-width: 720px; }
	.azf-modal-panel { width: min(1040px, 80vw); }
}

/* ------------------------------------------------------------------ *
 * 12. Motion preferences
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.azf-sr-body * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.azf-sr-body.azf-hover-preview .azf-card:hover { transform: none; }
}
