/* 科学放映厅：片库页、放映页与首页“科学放映厅”一排。
   影院式深色基调衬托霓虹风格的动画画面；学科色（--accent）只用于描边、光晕和标签。 */
/* 页眉保持门户原样；放映厅主体是一整块通栏深色“影厅”（box-shadow + clip-path 把背景铺满视口宽度） */
.theater-page{--t-ink:#eef3ff;--t-muted:#94a3c2;--t-line:#ffffff17;--t-glass:#ffffff0b;--t-bg:#060a14;width:min(1760px,calc(100% - 64px));margin:0 auto;padding:26px 0 48px;color:var(--t-ink);background:var(--t-bg);box-shadow:0 0 0 100vmax var(--t-bg);clip-path:inset(0 -100vmax)}
body:has(.theater-page)>footer{margin-top:0}
.theater-page a{color:inherit;text-decoration:none}
.theater-page button{font:inherit;cursor:pointer}

/* ---------- 顶部：正在放映 ---------- */
.theater-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:26px;background:#0a0f20;box-shadow:0 30px 70px -30px #000,inset 0 0 0 1px #ffffff12}
.theater-hero-backdrop{position:absolute;inset:-60px;z-index:-3;background-size:cover;background-position:center;filter:blur(34px) saturate(1.5) brightness(.5);transform:scale(1.08);opacity:0;transition:opacity 1.2s ease}
.theater-hero-backdrop.is-active{opacity:1}
.theater-hero::before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,#060a16f2 0%,#060a16cc 38%,#060a1640 70%,#060a1660 100%),radial-gradient(60% 90% at 0% 0%,#5b8cff2e,transparent 70%)}
.theater-hero::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.5;background:repeating-linear-gradient(0deg,#ffffff05 0 1px,transparent 1px 3px)}
.theater-hero-inner{display:grid;grid-template-columns:minmax(0,1fr) minmax(460px,47%);align-items:center;gap:56px;padding:44px 52px 40px}
.theater-kicker{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:#9fdcff;font-size:14px;font-weight:800;letter-spacing:.32em}
.theater-rec{width:10px;height:10px;border-radius:50%;background:#ff4d6d;box-shadow:0 0 12px #ff4d6d;animation:theaterRec 1.6s ease-in-out infinite}
@keyframes theaterRec{50%{opacity:.25}}
.theater-hero h1{margin:0;font-size:clamp(46px,4.6vw,76px);line-height:1.05;letter-spacing:.06em;background:linear-gradient(100deg,#7ff0ff 0%,#ffffff 38%,#ffd2f0 70%,#ffc46b 100%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 6px 30px #6fd8ff40)}
.theater-lead{max-width:600px;margin:18px 0 0;color:#c3cde4;font-size:18px;line-height:1.8}
.theater-stats{display:flex;gap:14px;margin:30px 0 0;padding:0;list-style:none}
.theater-stats li{display:grid;gap:2px;min-width:112px;padding:14px 18px;border-radius:16px;background:#ffffff0d;border:1px solid #ffffff1a;backdrop-filter:blur(6px)}
.theater-stats b{font-size:34px;line-height:1;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.theater-stats span{color:var(--t-muted);font-size:14px}

.theater-now{display:grid}
.theater-now-slide{grid-area:1/1;display:grid;gap:16px;opacity:0;visibility:hidden;transform:translateY(10px) scale(.985);transition:opacity .7s ease,transform .7s ease,visibility 0s .7s}
.theater-now-slide.is-active{opacity:1;visibility:visible;transform:none;transition:opacity .7s ease,transform .7s ease}
.theater-screen{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;border-radius:18px;background:#000;box-shadow:0 0 0 1px #ffffff2a,0 36px 80px -26px color-mix(in srgb,var(--accent) 70%,transparent),0 18px 40px -20px #000}
.theater-screen img{width:100%;height:100%;object-fit:cover;display:block;transition:transform 6s ease}
.theater-now-slide.is-active .theater-screen img{transform:scale(1.05)}
.theater-screen em{position:absolute;right:14px;bottom:12px;padding:4px 10px;border-radius:8px;background:#000000b3;color:#fff;font:700 14px/1.2 Consolas,"Microsoft YaHei",monospace}
.theater-now-copy{display:grid;gap:4px;padding:0 4px}
.theater-now-copy small{color:color-mix(in srgb,var(--accent) 80%,#fff);font-size:14px;font-weight:700;letter-spacing:.06em}
.theater-now-copy strong{font-size:28px;line-height:1.2}
.theater-now-copy>span{color:var(--t-muted);font-size:16px}
.theater-dots{display:flex;gap:8px;margin-top:16px;padding-left:4px}
.theater-dots button{width:26px;height:6px;padding:0;border:0;border-radius:6px;background:#ffffff33;transition:width .3s,background .3s}
.theater-dots button[aria-selected="true"]{width:46px;background:#fff}

/* 通用播放按钮：玻璃圆盘 + 三角 */
.theater-play{position:absolute;left:50%;top:50%;width:76px;height:76px;margin:-38px 0 0 -38px;border-radius:50%;background:#ffffff26;border:1.5px solid #ffffffb3;backdrop-filter:blur(8px);box-shadow:0 10px 30px #0008;transition:transform .25s ease,opacity .25s ease,background .25s}
.theater-play::after{content:"";position:absolute;left:31px;top:24px;border-left:22px solid #fff;border-top:14px solid transparent;border-bottom:14px solid transparent}
.theater-now-slide:hover .theater-play{transform:scale(1.1);background:color-mix(in srgb,var(--accent) 55%,transparent)}

/* ---------- 筛选条 ---------- */
.theater-toolbar{position:sticky;top:0;z-index:20;display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;margin:26px 0 8px;padding:14px 0;background:linear-gradient(var(--t-bg) 75%,transparent)}
.theater-tabs{display:flex;flex-wrap:wrap;gap:10px}
.theater-tabs button{--accent:#cfd8ea;display:inline-flex;align-items:center;gap:9px;padding:10px 20px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-glass);color:#d5ddef;font-size:17px;font-weight:800;transition:.18s}
.theater-tabs button::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 10px var(--accent)}
.theater-tabs button[data-theater-subject="all"]::before{background:conic-gradient(#3ee0ff,#45f0a0,#ffb347,#ff8ac2,#b39bff,#3ee0ff);box-shadow:none}
.theater-tabs button b{min-width:26px;padding:1px 8px;border-radius:999px;background:#ffffff14;color:var(--t-muted);font-size:13px;text-align:center}
.theater-tabs button:hover{border-color:color-mix(in srgb,var(--accent) 70%,transparent);color:#fff}
.theater-tabs button[aria-pressed="true"]{color:#fff;border-color:var(--accent);background:color-mix(in srgb,var(--accent) 20%,#0b1222);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent),0 8px 24px -10px var(--accent)}
.theater-tabs button[aria-pressed="true"] b{background:var(--accent);color:#06121f}
.theater-grades{display:inline-flex;padding:4px;border-radius:999px;background:var(--t-glass);border:1px solid var(--t-line)}
.theater-grades button{padding:7px 16px;border:0;border-radius:999px;background:transparent;color:var(--t-muted);font-size:15px;font-weight:700;transition:.18s}
.theater-grades button:hover{color:#fff}
.theater-grades button[aria-pressed="true"]{background:#fff;color:#0b1426}
.theater-search{display:flex;align-items:center;gap:8px;margin-left:auto;width:min(320px,100%);padding:0 16px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-glass);color:var(--t-muted)}
.theater-search svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.theater-search input{flex:1;min-width:0;height:44px;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:15px}
.theater-search:focus-within{border-color:#7fd8ff;box-shadow:0 0 0 3px #7fd8ff2e}

/* ---------- 片库分区与卡片 ---------- */
/* 片库列数固定随窗口变化；少片学科（.is-compact）按自身片数占宽，与相邻少片学科并排 */
.theater-shelves{--cols:4;--gap:22px;display:flex;flex-wrap:wrap;column-gap:var(--gap)}
.theater-shelf{flex:0 0 100%;margin-top:26px}
.theater-shelf.is-compact{flex:0 0 auto;width:calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols) * var(--n) + (var(--n) - 1) * var(--gap))}
.theater-shelf.is-compact{order:1}.theater-shelf[data-theater-shelf="tech"]{order:2}
.theater-shelf[hidden]{display:none}
.theater-shelf>header{display:flex;align-items:baseline;gap:14px;margin:0 0 16px}
.theater-shelf h2{position:relative;margin:0;padding-left:18px;font-size:26px}
.theater-shelf h2::before{content:"";position:absolute;left:0;top:5px;bottom:5px;width:6px;border-radius:6px;background:var(--accent);box-shadow:0 0 14px var(--accent)}
.theater-shelf>header span{color:var(--t-muted);font-size:15px}
.theater-grid{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:24px var(--gap)}
.theater-shelf.is-compact .theater-grid{grid-template-columns:repeat(var(--n),minmax(0,1fr))}
@media(min-width:1800px){.theater-shelves{--cols:5}}
@media(max-width:1280px){.theater-shelves{--cols:3}}
@media(max-width:900px){.theater-shelves{--cols:2}}
.theater-card{display:flex;flex-direction:column;overflow:hidden;border-radius:18px;background:linear-gradient(180deg,#ffffff0c,#ffffff05);border:1px solid #ffffff12;transition:transform .25s ease,border-color .25s,box-shadow .25s}
.theater-card[hidden]{display:none}
.theater-card:hover,.theater-card:focus-visible{transform:translateY(-5px);border-color:color-mix(in srgb,var(--accent) 75%,transparent);box-shadow:0 22px 44px -18px color-mix(in srgb,var(--accent) 65%,transparent);outline:0}
.theater-thumb{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:#000}
.theater-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease,filter .3s}
.theater-thumb::after{content:"";position:absolute;inset:55% 0 0;background:linear-gradient(transparent,#000a);pointer-events:none}
.theater-card .theater-play{width:58px;height:58px;margin:-29px 0 0 -29px;opacity:0;transform:scale(.8);z-index:1}
.theater-card .theater-play::after{left:23px;top:17px;border-left-width:17px;border-top-width:11px;border-bottom-width:11px}
.theater-card:hover .theater-thumb img,.theater-card:focus-visible .theater-thumb img{transform:scale(1.06);filter:brightness(.8)}
.theater-card:hover .theater-play,.theater-card:focus-visible .theater-play{opacity:1;transform:none;background:color-mix(in srgb,var(--accent) 50%,transparent)}
.theater-badges{position:absolute;left:10px;top:10px;z-index:1;display:flex;gap:6px}
.theater-grade,.theater-interactive{padding:3px 10px;border-radius:999px;font-size:13px;font-weight:800;line-height:1.5}
.theater-grade{background:var(--accent);color:#06121f;box-shadow:0 0 14px color-mix(in srgb,var(--accent) 60%,transparent)}
.theater-interactive{background:#ffd166;color:#2b1d00}
.theater-duration{position:absolute;right:10px;bottom:9px;z-index:1;padding:2px 8px;border-radius:7px;background:#000000b8;color:#fff;font:700 13px/1.4 Consolas,"Microsoft YaHei",monospace;font-style:normal}
.theater-card-body{display:grid;gap:5px;padding:14px 16px 16px}
.theater-card-body strong{font-size:19px;line-height:1.35}
.theater-card-body small{color:var(--t-muted);font-size:14px}
.theater-tags{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 0}
.theater-tags span{padding:2px 9px;border-radius:999px;font-size:12px;color:color-mix(in srgb,var(--accent) 70%,#fff);background:color-mix(in srgb,var(--accent) 12%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent)}
.theater-empty{margin:60px 0;text-align:center;color:var(--t-muted);font-size:17px}

/* ---------- 放映页 ---------- */
.theater-watch{width:min(1880px,calc(100% - 56px));padding-top:14px}
.theater-crumbs{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:var(--t-muted);font-size:15px}
.theater-crumbs a:hover{color:#fff}
.theater-crumbs b{color:#fff;font-weight:700}
.theater-watch-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:start}
.theater-stage{position:relative;width:min(100%,calc((100vh - 170px) * 16 / 9));aspect-ratio:16/9;margin:0 auto;overflow:hidden;border-radius:16px;background:#000;box-shadow:0 0 0 1px #ffffff1f,0 30px 70px -46px color-mix(in srgb,var(--accent) 70%,transparent)}
.theater-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.theater-info{display:flex;justify-content:space-between;align-items:flex-start;gap:28px;width:min(100%,calc((100vh - 170px) * 16 / 9));margin:22px auto 0}
.theater-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.theater-meta span{padding:3px 11px;border-radius:999px;background:#ffffff12;color:#d5ddef;font-size:14px;font-weight:700}
.theater-meta .theater-subject{background:var(--accent);color:#06121f}
.theater-meta .theater-interactive{background:#ffd166;color:#2b1d00}
.theater-info h1{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 16px;margin:0;font-size:34px;line-height:1.25}
.theater-info h1 small{color:var(--t-muted);font-size:19px;font-weight:600}
.theater-desc{max-width:880px;margin:12px 0 0;color:#c3cde4;font-size:17px;line-height:1.8}
.theater-info .theater-tags{margin-top:12px}
.theater-actions{display:flex;flex-direction:column;gap:10px;flex-shrink:0}
.theater-actions>*{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:150px;padding:12px 20px;border:1px solid var(--t-line);border-radius:12px;background:var(--t-glass);color:#e6ecfa;font-size:16px;font-weight:700;transition:.18s}
.theater-actions svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theater-actions>*:hover{border-color:var(--accent);color:#fff}
.theater-actions .is-primary{border-color:transparent;background:var(--accent);color:#06121f}
.theater-actions .is-primary:hover{color:#06121f;filter:brightness(1.1);box-shadow:0 10px 26px -10px var(--accent)}
.theater-queue{padding:18px;border-radius:20px;background:#ffffff08;border:1px solid var(--t-line)}
.theater-queue h2{margin:0 0 14px;font-size:20px}
.theater-queue ol{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.theater-queue li a{display:grid;grid-template-columns:136px minmax(0,1fr);gap:12px;align-items:center;padding:6px;border-radius:12px;transition:background .18s}
.theater-queue li a:hover{background:#ffffff10}
.theater-queue-thumb{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;border-radius:9px;background:#000;box-shadow:inset 0 0 0 1px #ffffff1a}
.theater-queue-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.theater-queue-thumb em{position:absolute;right:5px;bottom:4px;padding:0 5px;border-radius:5px;background:#000000c0;color:#fff;font:700 11px/1.5 Consolas,monospace;font-style:normal}
.theater-queue-copy{display:grid;gap:3px;min-width:0}
.theater-queue-copy strong{font-size:15px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.theater-queue-copy small{color:color-mix(in srgb,var(--accent) 70%,#fff);font-size:13px}
.theater-queue-all{display:block;margin-top:14px;padding:11px;border-radius:12px;text-align:center;background:#ffffff0d;color:#d5ddef;font-weight:700}
.theater-queue-all:hover{background:#ffffff1a;color:#fff}

@media(max-width:1280px){.theater-hero-inner{grid-template-columns:1fr 1fr;gap:36px;padding:36px 36px 32px}.theater-watch-grid{grid-template-columns:1fr}.theater-queue ol{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}}
@media(max-width:900px){.theater-page{width:calc(100% - 28px)}.theater-hero-inner{grid-template-columns:1fr}.theater-search{margin-left:0}.theater-info{flex-direction:column}.theater-actions{flex-direction:row}}
@media(prefers-reduced-motion:reduce){.theater-page *,.home-theater *{animation:none!important;transition:none!important}}

/* ---------- 首页：科学放映厅一排（五部小片，紧凑） ---------- */
.home-theater{position:relative;isolation:isolate;margin:14px 0 22px;padding:16px 20px 18px;border-radius:18px;overflow:hidden;color:#eef3ff;background:radial-gradient(70% 120% at 100% 0%,#3a2b7a66,transparent 60%),radial-gradient(60% 100% at 0% 100%,#0f5b6b55,transparent 60%),#070c1a;box-shadow:0 18px 40px -28px #0b1a3a}
.home-theater a{color:inherit;text-decoration:none}
.home-theater-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.home-theater-head h2{display:flex;align-items:center;gap:10px;margin:0;font-size:21px;letter-spacing:.04em;color:#fff}
.home-theater-head h2::before{content:"";width:9px;height:9px;border-radius:50%;background:#ff4d6d;box-shadow:0 0 10px #ff4d6d;animation:theaterRec 1.6s ease-in-out infinite}
.home-theater-head h2 span{color:#94a3c2;font-size:14px;font-weight:600;letter-spacing:0}
.home-theater-head>a{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;background:#fff;color:#0b1426!important;font-weight:800;font-size:14px;transition:.18s;white-space:nowrap}
.home-theater-head>a:hover{box-shadow:0 6px 18px -6px #7ff0ff}
.home-theater-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.home-theater-card{position:relative;display:block;overflow:hidden;border-radius:12px;background:#000;aspect-ratio:16/9;box-shadow:0 0 0 1px #ffffff1c;transition:transform .25s,box-shadow .25s}
.home-theater-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.home-theater-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,#000000e6)}
.home-theater-card:hover{transform:translateY(-3px);box-shadow:0 0 0 1px var(--accent),0 16px 32px -14px var(--accent)}
.home-theater-card:hover img{transform:scale(1.05)}
.home-theater-card .theater-play{z-index:1;width:46px;height:46px;margin:-23px 0 0 -23px;opacity:0;transform:scale(.8)}
.home-theater-card .theater-play::after{left:18px;top:13px;border-left-width:14px;border-top-width:10px;border-bottom-width:10px}
.home-theater-card:hover .theater-play{opacity:1;transform:none;background:color-mix(in srgb,var(--accent) 55%,transparent)}
.home-theater-copy{position:absolute;left:0;right:0;bottom:0;z-index:1;display:grid;gap:1px;padding:8px 11px}
.home-theater-copy small{color:color-mix(in srgb,var(--accent) 80%,#fff);font-size:11px;font-weight:800}
.home-theater-copy strong{font-size:15px;line-height:1.3;text-shadow:0 2px 8px #000}
.home-theater-card em{position:absolute;right:8px;top:8px;z-index:1;padding:1px 6px;border-radius:6px;background:#000000b8;color:#fff;font:700 11px/1.5 Consolas,monospace;font-style:normal}
@media(max-width:1100px){.home-theater-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-theater-card:nth-child(n+4){display:none}}
