/* YoungTV.AI 卡片式版面：首頁是深藍底的 Netflix 式卡片列，其他頁面的元件沿用佈景主題底色。 */
.ytv {
	--ytv-bg: #0a1322;
	--ytv-surface: #111e35;
	--ytv-line: #22355a;
	--ytv-fg: #eef3fa;
	--ytv-muted: #9db0cb;
	--ytv-accent: #3fd3e3;
	--ytv-warm: #f3c76d;
	--ytv-display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
	--ytv-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
	font-family: var(--ytv-body);
}
.ytv, .ytv *, .ytv *::before, .ytv *::after { box-sizing: border-box; }
/* 滿版區塊用 vw 計算，會多出捲軸寬度，這裡避免出現橫向捲動 */
html:has(.ytv-home), body:has(.ytv-home) { overflow-x: clip; }

/* 首頁滿版深藍底 */
.ytv.ytv-home {
	background: var(--ytv-bg);
	color: var(--ytv-fg);
	/* 佈景主題常把內文限制在窄欄，這裡強制撐滿整個視窗寬 */
	width: auto;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding: 24px max(16px, calc(50vw - 700px)) 48px;
}
.ytv-home .ytv-rowhead h2, .ytv-home .ytv-rowhead p { color: inherit; }

/* 主視覺 */
.ytv-hero { position: relative; border-radius: 14px; overflow: hidden; background: var(--ytv-surface); }
.ytv-hero img { display: block; width: 100%; aspect-ratio: 2.35 / 1; max-height: 560px; object-fit: cover; object-position: left 22%; }
.ytv-cta { position: absolute; right: 24px; bottom: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.ytv-btn { display: inline-block; border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 14px; text-decoration: none !important; line-height: 1.4; }
.ytv-btn--primary { background: var(--ytv-accent); color: #04202a !important; }
.ytv-btn--ghost { background: rgba(6, 14, 28, .72); color: var(--ytv-fg) !important; border: 1px solid rgba(255, 255, 255, .25); }
.ytv-btn:hover { filter: brightness(1.08); }
@media (max-width: 640px) {
	.ytv-hero img { aspect-ratio: 4 / 3; }
	.ytv-cta { position: static; padding: 12px; }
}

/* 卡片列 */
.ytv-row { margin-top: 34px; }
.ytv-rowhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ytv-rowhead h2 { font-family: var(--ytv-display); font-weight: 900; font-size: 24px; margin: 0; padding-left: 12px; border-left: 4px solid var(--ytv-accent); line-height: 1.2; }
.ytv-rowhead p { margin: 0; opacity: .7; font-size: 13.5px; }
.ytv-more { margin-left: auto; color: var(--ytv-accent) !important; font-size: 13.5px; text-decoration: none !important; }
.ytv-trackwrap { position: relative; }
.ytv-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.ytv-arrow { position: absolute; top: 0; bottom: 10px; width: 44px; border: 0; padding: 0; background: linear-gradient(90deg, rgba(10, 19, 34, .9), transparent); color: #fff; font-size: 26px; cursor: pointer; opacity: 0; transition: opacity .2s; z-index: 2; }
.ytv-arrow--r { right: 0; background: linear-gradient(270deg, rgba(10, 19, 34, .9), transparent); }
.ytv-arrow--l { left: 0; }
.ytv-trackwrap:hover .ytv-arrow { opacity: 1; }
@media (hover: none) { .ytv-arrow { display: none; } }

/* 卡片 */
.ytv-card { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; background: var(--ytv-surface); border: 1px solid var(--ytv-line); border-radius: 10px; overflow: hidden; color: var(--ytv-fg) !important; text-decoration: none !important; transition: transform .25s ease, border-color .25s; }
.ytv-card:hover, .ytv-card:focus-visible { transform: translateY(-4px) scale(1.02); border-color: var(--ytv-accent); }
.ytv-card:focus-visible { outline: 2px solid var(--ytv-accent); outline-offset: 2px; }
.ytv-pic { position: relative; display: block; }
.ytv-pic img, .ytv-noimg { display: block; width: 100%; height: auto; object-fit: cover; margin: 0; }
.ytv-noimg { display: grid; place-items: center; background: linear-gradient(135deg, #13284a, #0a1322); color: var(--ytv-accent); font-weight: 800; letter-spacing: .05em; font-size: 13px; }
.ytv-txt { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.ytv-txt strong { font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.ytv-txt span { color: var(--ytv-muted); font-size: 12.5px; line-height: 1.5; }
.ytv-card--news { width: 228px; }
.ytv-card--news img, .ytv-card--news .ytv-noimg { aspect-ratio: 8 / 7; }
.ytv-card--book { width: 196px; }
.ytv-card--book img, .ytv-card--book .ytv-noimg { aspect-ratio: 6 / 7; }
.ytv-card--film { width: 200px; }
.ytv-card--film img, .ytv-card--film .ytv-noimg { aspect-ratio: 3 / 4; }
.ytv-chip { position: absolute; left: 8px; top: 8px; font-size: 12px; font-weight: 700; background: rgba(6, 14, 28, .78); color: var(--ytv-fg); padding: 2px 9px 2px 8px; border-left: 3px solid var(--ytv-accent); border-radius: 3px; line-height: 1.6; }
.ytv-chip--kind { border-left-color: var(--ytv-warm); }

/* 分類圖塊 */
.ytv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ytv-tile { position: relative; display: block; aspect-ratio: 3 / 2; border: 1px solid var(--ytv-line); border-radius: 10px; overflow: hidden; background: var(--ytv-surface); color: #fff !important; text-decoration: none !important; }
.ytv-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .25s, transform .4s; margin: 0; }
.ytv-tile:hover img { opacity: .8; transform: scale(1.05); }
.ytv-tile span { position: absolute; left: 12px; bottom: 10px; font-family: var(--ytv-display); font-weight: 900; font-size: 22px; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.ytv-tile em { position: absolute; right: 10px; bottom: 12px; font-style: normal; font-size: 12px; opacity: .85; }

/* 創辦人區塊 */
.ytv-founder { margin-top: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; background: var(--ytv-surface); border: 1px solid var(--ytv-line); border-radius: 14px; padding: 28px; color: var(--ytv-fg); }
.ytv-founder blockquote { margin: 0 0 14px; padding: 0; border: 0; font-family: var(--ytv-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.5; color: inherit; }
.ytv-who { color: var(--ytv-muted); font-size: 14px; margin-bottom: 16px; }
.ytv-founder img { width: 100%; border-radius: 10px; display: block; }
@media (max-width: 760px) { .ytv-founder { grid-template-columns: 1fr; padding: 20px; } }

/* 單篇頁面 */
.ytv-info { border: 1px solid currentColor; border-color: rgba(127, 140, 160, .35); border-radius: 12px; padding: 14px 18px; margin: 0 0 20px; }
.ytv-info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.ytv-info dt { opacity: .65; }
.ytv-info dd { margin: 0; }
.ytv-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 24px; border-radius: 12px; overflow: hidden; background: #000; }
.ytv-video iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.ytv-tags { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.ytv-tagrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.ytv-tagrow b { min-width: 3.5em; opacity: .65; font-weight: 500; }
.ytv-tagrow a { border: 1px solid rgba(127, 140, 160, .45); border-radius: 999px; padding: 1px 12px; text-decoration: none; }
.ytv-tagrow a:hover { border-color: var(--ytv-accent); }

@media (prefers-reduced-motion: reduce) {
	.ytv-card, .ytv-tile img, .ytv-arrow { transition: none; }
}
