/* 冰寒影視（AI 影像）— 深色放映廳底色 + 主站同一套飽和色（黃、珊瑚、紫）點綴，年輕一點 */
:root {
  --night: #0f1218; --panel: #171b23; --line: #262c38; --text: #e9e6df; --muted: #8b93a3; --tungsten: #ffc619; --tungsten-2: #ffd75a; --coral: #ff5b4a; --violet: #8a5cff;
  --serif: "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* , *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; margin: 0; letter-spacing: .01em; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--tungsten); outline-offset: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.f-nav { position: sticky; top: 0; z-index: 40; background: rgba(15,18,24,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.f-nav .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.f-logo { font-family: var(--sans); font-weight: 700; font-size: 20px; letter-spacing: .12em; }
.f-logo small { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--muted); letter-spacing: .04em; margin-left: 10px; }
.f-links { display: flex; align-items: center; gap: 6px; }
.f-links a { padding: 8px 12px; color: var(--muted); font-size: 15px; }
.f-links a:hover, .f-links a[aria-current] { color: var(--text); }
.f-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 15px; border: 1px solid transparent; cursor: pointer; }
.f-btn.gold { background: var(--tungsten); color: #1a1408; }
.f-btn.gold:hover { background: var(--tungsten-2); }
.f-btn.line { background: #06c755; color: #fff; }
.f-btn.ghost { border-color: rgba(233,230,223,.4); color: var(--text); }
.f-btn.ghost:hover { border-color: var(--text); }
.f-links .f-btn { margin-left: 8px; min-height: 38px; padding: 0 16px; color: #fff; }

/* 主視覺：先顯示海報，影片載入後淡入 */
.f-hero { position: relative; height: min(82vh, 760px); min-height: 460px; overflow: hidden; background: #000; }
.f-hero-poster, .f-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f-hero-poster { filter: saturate(.9); }
.f-hero-video { opacity: 0; transition: opacity 1.2s ease; }
.f-hero-video.ready { opacity: 1; }
.f-hero-fallback { position: absolute; inset: 0; background: radial-gradient(80% 70% at 70% 30%, #2a2f3b 0%, #0f1218 70%); }
.f-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,18,24,.15) 0%, rgba(15,18,24,.25) 50%, rgba(15,18,24,.95) 100%); }
.f-hero .wrap { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 64px; }
.f-hero h1 { font-size: clamp(36px, 5.6vw, 72px); line-height: 1.2; max-width: 11em; }
.f-hero p { margin-top: 16px; max-width: 30em; color: #cfd2d9; font-size: 17px; }
.f-hero .f-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.f-sound { position: absolute; right: 24px; bottom: 24px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); cursor: pointer; display: grid; place-items: center; }
.f-sound svg { width: 18px; height: 18px; }

.f-section { padding: 88px 0; }
.f-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.f-head h2 { font-size: clamp(26px, 3vw, 36px); }
.f-head a, .f-head p { color: var(--muted); font-size: 15px; }
.f-head a:hover { color: var(--tungsten); }

.f-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
.f-card { display: block; }
.f-card .f-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; }
.f-card .f-thumb img, .f-card .f-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f-card .f-thumb video { opacity: 0; transition: opacity .3s; }
.f-card:hover .f-thumb video.playing { opacity: 1; }
.f-card .f-ep { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); font-size: 12px; padding: 2px 8px; border-radius: 2px; }
.f-card h3 { margin-top: 12px; font-size: 20px; line-height: 1.4; }
.f-card:hover h3 { color: var(--tungsten-2); }
.f-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.f-tags span { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 1px 8px; border-radius: 2px; }
.f-card p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.f-empty { padding: 60px 0; color: var(--muted); text-align: center; border: 1px dashed var(--line); }

.f-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.f-services div { padding: 22px 0; border-top: 1px solid var(--line); }
.f-services h3 { font-size: 22px; margin-bottom: 6px; }
.f-services p { color: var(--muted); }

.f-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.f-steps li { counter-increment: s; border-top: 2px solid var(--tungsten); padding-top: 16px; }
.f-steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--sans); font-weight: 700; color: var(--tungsten); font-size: 15px; }
.f-steps h3 { font-size: 19px; margin: 6px 0; }
.f-steps p { color: var(--muted); font-size: 15px; }

.f-contact { background: var(--panel); border-top: 1px solid var(--line); }
.f-contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.f-contact h2 { font-size: clamp(28px, 3.2vw, 40px); }
.f-contact .lead { color: var(--muted); margin-top: 12px; max-width: 26em; }
.f-ways { border-top: 1px solid var(--line); }
.f-ways div { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.f-ways span { color: var(--muted); font-size: 14px; }
.f-ways b { font-weight: 500; overflow-wrap: anywhere; }
.f-ways button, .f-ways a.mini { background: none; border: 1px solid var(--line); color: var(--text); font-size: 13px; padding: 4px 12px; border-radius: 3px; cursor: pointer; }
.f-ways a.mini { background: #06c755; border-color: #06c755; color: #fff; }

.f-foot { padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.f-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.f-foot a:hover { color: var(--text); }

/* 詳情頁 */
.f-player-wrap { background: #000; }
.f-player { max-width: 1240px; margin: 0 auto; aspect-ratio: 16 / 9; max-height: 78vh; display: flex; align-items: center; justify-content: center; }
.f-player video, .f-player img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.f-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-top: 36px; padding-bottom: 80px; }
.f-detail h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.3; }
.f-detail .f-intro { margin-top: 18px; color: #c8ccd4; white-space: pre-line; max-width: 40em; }
.f-eps h2 { font-size: 18px; margin-bottom: 12px; }
.f-eps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.f-eps button { width: 100%; padding: 10px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; font-variant-numeric: tabular-nums; }
.f-eps button:hover { border-color: var(--muted); }
.f-eps button[aria-current="true"] { background: var(--tungsten); color: #1a1408; border-color: var(--tungsten); font-weight: 700; }
.f-eps .hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.f-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.f-filter button { background: none; border: 1px solid var(--line); color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.f-filter button[aria-pressed="true"] { background: var(--text); color: var(--night); border-color: var(--text); }
.f-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--night); padding: 8px 16px; border-radius: 4px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 99; }
.f-toast.show { opacity: 1; }

@media (max-width: 900px) {
  .f-links a:not(.f-btn) { display: none; }
  .f-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .f-services { grid-template-columns: 1fr; }
  .f-steps { grid-template-columns: 1fr 1fr; }
  .f-contact-grid, .f-detail { grid-template-columns: 1fr; gap: 32px; }
  .f-section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .f-logo small { display: none; }
  .f-grid { grid-template-columns: 1fr; }
  .f-steps { grid-template-columns: 1fr; }
  .f-hero { height: 76vh; }
  .f-hero .wrap { padding-bottom: 40px; }
  .f-hero p { font-size: 15px; }
  .f-hero .f-cta .f-btn { flex: 1; }
  .f-ways div { grid-template-columns: 64px 1fr auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
