/* PanSou × AIO dark visual system — 2026-07-17 */
:root{
  color-scheme:dark!important;
  --background:216 28% 6%!important;
  --foreground:190 24% 94%!important;
  --card:216 25% 9%!important;
  --card-foreground:190 24% 94%!important;
  --popover:215 25% 10%!important;
  --popover-foreground:190 24% 94%!important;
  --primary:177 32% 56%!important;
  --primary-foreground:216 30% 7%!important;
  --secondary:215 21% 13%!important;
  --secondary-foreground:190 18% 88%!important;
  --muted:214 18% 14%!important;
  --muted-foreground:207 12% 68%!important;
  --accent:174 30% 16%!important;
  --accent-foreground:174 62% 70%!important;
  --border:211 18% 21%!important;
  --input:211 18% 22%!important;
  --ring:174 59% 58%!important;
  --radius:.8rem!important;
  --aio-bg:#090d13;
  --aio-bg-warm:#0d0f12;
  --aio-surface:#101720;
  --aio-surface-raised:#141c25;
  --aio-surface-soft:#0d141c;
  --aio-border:rgba(135,167,177,.16);
  --aio-border-strong:rgba(82,213,202,.42);
  --aio-text:#edf4f7;
  --aio-muted:#a6b2bb;
  --aio-cyan:#66b9b3;
  --aio-green:#6ee7a8;
  --aio-gold:#b99755;
  --aio-red:#f47777;
}
html,body,#app{min-height:100%;background:var(--aio-bg)!important;color:var(--aio-text)!important}html,body{overflow-x:clip}
body{position:relative;isolation:isolate;background-image:radial-gradient(circle at 18% -8%,rgba(185,151,85,.07),transparent 34%),linear-gradient(155deg,var(--aio-bg) 0%,var(--aio-bg-warm) 55%,#080c11 100%)!important}
body::before,body::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none}
body::before{inset:-18%;background:radial-gradient(circle at 28% 28%,rgba(82,213,202,.075),transparent 30%),radial-gradient(circle at 76% 68%,rgba(154,120,61,.055),transparent 33%);opacity:.7;animation:aio-ambient-drift 24s ease-in-out infinite alternate;will-change:transform}
body::after{background-image:linear-gradient(rgba(138,167,177,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(138,167,177,.025) 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.72),transparent 82%)}
#app,.app-shell{position:relative;z-index:0;background:transparent!important}
.bg-decorative{opacity:.22!important;filter:none!important}
.nav-header{background:rgba(9,13,19,.88)!important;border-color:var(--aio-border)!important;box-shadow:0 1px 0 rgba(255,255,255,.018);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.footer-shell{background:rgba(9,13,19,.74)!important;border-color:var(--aio-border)!important;color:var(--aio-muted)!important}
.bg-white,.bg-gray-50,.bg-gray-100,.dark\:bg-gray-700,.dark\:bg-gray-800,.dark\:bg-gray-900,.bg-background{background-color:var(--aio-surface)!important}
.text-gray-900,.dark\:text-white,.dark\:text-gray-100,.text-foreground{color:var(--aio-text)!important}
.text-gray-700,.text-gray-600,.dark\:text-gray-300,.dark\:text-gray-400,.text-muted-foreground{color:var(--aio-muted)!important}
.border-gray-200,.border-gray-300,.dark\:border-gray-600,.dark\:border-gray-700,.border-border{border-color:var(--aio-border)!important}
.search-form-block{position:relative;z-index:3}
.search-container{filter:none!important}
.search-container input,input,select,textarea{background:rgba(16,23,32,.94)!important;color:var(--aio-text)!important;border-color:rgba(135,167,177,.23)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 10px 28px rgba(0,0,0,.16)!important;caret-color:var(--aio-cyan)}
input::placeholder,textarea::placeholder{color:#8f9da8!important;opacity:1}
input:hover,select:hover,textarea:hover{border-color:rgba(135,167,177,.38)!important}
input:focus,input:focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:2px solid rgba(82,213,202,.68)!important;outline-offset:2px!important;border-color:var(--aio-border-strong)!important;box-shadow:0 0 0 4px rgba(82,213,202,.09),0 12px 30px rgba(0,0,0,.2)!important}
button,a,[role="button"],input,select,textarea{transition:color 190ms ease,background-color 190ms ease,border-color 190ms ease,box-shadow 190ms ease,transform 190ms ease!important}
button{box-shadow:none}
button:not(:disabled):hover,[role="button"]:not([aria-disabled="true"]):hover{transform:translateY(-1px);border-color:var(--aio-border-strong)!important;box-shadow:0 7px 18px rgba(0,0,0,.18),0 0 0 1px rgba(82,213,202,.035)!important}
button:not(:disabled):active,[role="button"]:not([aria-disabled="true"]):active{transform:translateY(0);box-shadow:inset 0 1px 5px rgba(0,0,0,.22)!important}
button:focus-visible,a:focus-visible,[role="button"]:focus-visible{outline:2px solid rgba(82,213,202,.78)!important;outline-offset:2px!important}
button:disabled,[aria-disabled="true"]{opacity:.45!important;cursor:not-allowed!important}
.nav-button,.pagination button,[class*="pagination"] button{border-radius:999px!important}
.advanced-toggle-left{border-radius:11px 0 0 11px!important}
.search-container button.absolute{border-radius:0 11px 11px 0!important}
.nav-button.active{color:var(--aio-text)!important;background:linear-gradient(110deg,rgba(82,213,202,.24),rgba(82,213,202,.13))!important;border:1px solid rgba(82,213,202,.28)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 0 22px rgba(82,213,202,.055)!important}
.search-container button:not(:disabled),.nav-button.active{overflow:hidden}
.search-container button:not(:disabled)::after,.nav-button.active::after{content:"";position:absolute;inset:-80% auto -80% -50%;width:35%;transform:rotate(18deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent);animation:aio-sheen 9s ease-in-out infinite;pointer-events:none}
.results-wrapper,.empty-state,.loading-state,.error-state,.result-card,[class*="result-card"],[class*="resource-card"],[class*="filter-panel"],[class*="filter-section"]{background:linear-gradient(145deg,rgba(18,26,35,.97),rgba(13,20,28,.96))!important;border:1px solid var(--aio-border)!important;border-radius:13px!important;box-shadow:0 12px 30px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.018)!important;color:var(--aio-text)!important}
.results-wrapper{padding:1px;background:rgba(16,23,32,.7)!important}
.empty-state,.loading-state,.error-state{min-height:210px;color:#aab6bf!important}
.empty-title,.footer-shell,.footer-shell a{color:#aab6bf!important}
.footer-shell .flex{gap:1.15rem!important}
.empty-icon{background:rgba(82,213,202,.09)!important;color:var(--aio-cyan)!important;box-shadow:0 0 0 1px rgba(82,213,202,.08)}
.result-card:hover,[class*="result-card"]:hover,[class*="resource-card"]:hover{transform:translateY(-2px);border-color:rgba(82,213,202,.3)!important;box-shadow:0 16px 34px rgba(0,0,0,.22),0 0 20px rgba(82,213,202,.035)!important}
.card,.results-container{background:linear-gradient(145deg,rgba(18,26,35,.97),rgba(13,20,28,.96))!important;color:var(--aio-text)!important;border:1px solid var(--aio-border)!important;border-radius:13px!important;box-shadow:0 12px 30px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.018)!important}
.stats-chip{background:rgba(82,213,202,.045)!important;border-color:rgba(135,167,177,.16)!important;border-radius:12px!important}.stats-label,.result-meta,.result-date{color:#9aa8b3!important}
.result-list{min-width:0}.result-item{min-width:0;padding:14px 12px!important;background:rgba(13,20,28,.68)!important;border-color:rgba(135,167,177,.13)!important;transition:transform 190ms ease,border-color 190ms ease,background-color 190ms ease,box-shadow 190ms ease!important}.result-item:hover{transform:translateY(-1px);background:rgba(18,28,37,.94)!important;border-color:rgba(82,213,202,.25)!important;box-shadow:0 9px 22px rgba(0,0,0,.16)!important}.result-header,.result-row,.result-title-row,.result-link{min-width:0}.result-title-button,.result-title{max-width:100%;min-width:0;color:var(--aio-text)!important;overflow-wrap:anywhere;text-align:left}.result-link{color:#7eddd5!important;overflow-wrap:anywhere;word-break:break-word}.result-source{color:#9be8e1!important;background:rgba(82,213,202,.07)!important;border-color:rgba(82,213,202,.2)!important}
.filter-tabs button,[class*="tabs"] button{color:#9aa8b3!important;border-color:rgba(135,167,177,.16)!important}.filter-tabs button.active,[class*="tabs"] button.active{color:var(--aio-cyan)!important;border-color:var(--aio-cyan)!important}
[role="dialog"],.modal,.dialog,[class*="modal-content"],[class*="dialog-content"],[data-radix-popper-content-wrapper]>div{background:var(--aio-surface-raised)!important;color:var(--aio-text)!important;border:1px solid rgba(135,167,177,.23)!important;border-radius:14px!important;box-shadow:0 24px 70px rgba(0,0,0,.5)!important}
.fixed.inset-0,.modal-overlay,[data-state="open"][class*="overlay"]{background:rgba(3,6,9,.7)!important;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.badge,[class*="badge"],[class*="tag"]{border-color:var(--aio-border)!important;background:rgba(82,213,202,.075)!important;color:#9be8e1!important}
.error-state,[class*="error"]{color:#ff9a9a!important}
[aria-busy="true"],.loading-state,[class*="skeleton"]{color:var(--aio-muted)!important}
[class*="skeleton"]{background:linear-gradient(90deg,#121a23,#18232d,#121a23)!important;background-size:200% 100%!important}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#090d13}
::-webkit-scrollbar-thumb{background:#2a3742;border:2px solid #090d13;border-radius:999px}
::-webkit-scrollbar-thumb:hover{background:#3a4d59}
*{scrollbar-color:#2a3742 #090d13;scrollbar-width:thin}
::selection{background:rgba(82,213,202,.28);color:#fff}
@keyframes aio-ambient-drift{from{transform:translate3d(-1.5%,0,0)}to{transform:translate3d(1.5%,-1%,0)}}
@keyframes aio-sheen{0%,68%,100%{transform:translateX(-220%) rotate(18deg)}78%{transform:translateX(560%) rotate(18deg)}}
@media(max-width:640px){
  .main-content{padding:1.1rem .72rem 1.5rem!important}
  .nav-header .container{padding-inline:.75rem!important}
  .nav-button{min-width:40px;padding-inline:.65rem!important}
  .results-wrapper,.empty-state,.loading-state,.error-state{border-radius:12px!important}
  body::after{background-size:30px 30px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  body::before{transform:none!important;will-change:auto}
}

/* Embed mode is opt-in; standalone PanSou retains its navigation and footer. */
html.aio-embed .nav-header{display:none!important}
html.aio-embed .footer-shell{display:none!important}
html.aio-embed .main-content{padding-top:.85rem!important}
html.aio-embed .bg-decorative{
  opacity:.07!important;
  animation:none!important;
  background-size:72px 72px!important;
  -webkit-mask-image:radial-gradient(ellipse 62% 48% at 50% 30%,#000 0%,rgba(0,0,0,.42) 48%,transparent 82%)!important;
  mask-image:radial-gradient(ellipse 62% 48% at 50% 30%,#000 0%,rgba(0,0,0,.42) 48%,transparent 82%)!important;
}
html.aio-embed body::before{animation:none!important;opacity:.22}
html.aio-embed body::after{opacity:.08;background-size:72px 72px}
html.aio-embed .empty-state{min-height:250px;border:0!important;background:transparent!important;box-shadow:none!important}
html.aio-embed .empty-icon{background:rgba(102,185,179,.055)!important;color:var(--aio-cyan)!important;box-shadow:none}
html.aio-embed .search-container button:not(:disabled)::after,html.aio-embed .nav-button.active::after{display:none}

/* Final embed pass: no nested empty-state frame, calmer texture and readable help. */
html.aio-embed .results-wrapper:has(.empty-state){padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
html.aio-embed .empty-state::after{content:"试试：电影名称 · 剧集名称 · 资源关键词\A支持来源：网盘公开索引 · 聚合搜索";display:block;max-width:34rem;margin:16px auto 0;color:#aebbc4;font-size:11px;line-height:1.75;white-space:pre-line;text-align:center;letter-spacing:.01em}
html.aio-embed .empty-title,html.aio-embed .result-meta,html.aio-embed .result-date,
html.aio-embed .stats-label,html.aio-embed .footer-shell,
html.aio-embed small,html.aio-embed [class*="text-xs"]{font-size:11px!important;color:#aebbc4!important;line-height:1.45}
html.aio-embed body::after{animation:none!important}
html.aio-embed [aria-busy="true"] body::after,html.aio-embed body:has([aria-busy="true"])::after,
html.aio-embed body:has(.loading-state)::after{animation:aio-loading-drift 2.2s ease-out 1!important}
@keyframes aio-loading-drift{from{background-position:0 0}to{background-position:14px 8px}}
@media(prefers-reduced-motion:reduce){
  html.aio-embed body::after{animation:none!important}
  html.aio-embed *,html.aio-embed *::before,html.aio-embed *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Warm Ivory light mode; standalone defaults to system, embed follows AIO. */
html[data-theme="light"]{color-scheme:light!important;--background:48 24% 96%!important;--foreground:0 0% 4%!important;--card:0 0% 100%!important;--card-foreground:0 0% 4%!important;--primary:36 34% 56%!important;--primary-foreground:0 0% 100%!important;--secondary:60 23% 97%!important;--secondary-foreground:0 0% 12%!important;--muted:48 16% 92%!important;--muted-foreground:60 2% 41%!important;--accent:158 16% 88%!important;--accent-foreground:161 22% 35%!important;--border:60 4% 82%!important;--input:60 4% 82%!important;--ring:36 34% 56%!important;--aio-bg:#F7F6F2;--aio-bg-warm:#FAFAF7;--aio-surface:#FFFFFF;--aio-surface-raised:#FFFFFF;--aio-surface-soft:#FAFAF7;--aio-border:#D4D4D0;--aio-border-strong:#B89764;--aio-text:#0A0A0A;--aio-muted:#696966;--aio-cyan:#4f8076;--aio-green:#527b70;--aio-gold:#B89764;--aio-red:#B8413A}
html[data-theme="light"],html[data-theme="light"] body,html[data-theme="light"] #app{background:#F7F6F2!important;color:#0A0A0A!important}html[data-theme="light"] body{background-image:radial-gradient(circle at 18% -8%,rgba(255,255,255,.9),transparent 34%),linear-gradient(155deg,#F7F6F2,#FAFAF7 55%,#f1eee6)!important}html[data-theme="light"] body::before{background:radial-gradient(circle at 28% 28%,rgba(79,128,118,.07),transparent 30%),radial-gradient(circle at 76% 68%,rgba(184,151,100,.08),transparent 33%)}html[data-theme="light"] .nav-header,html[data-theme="light"] .footer-shell{background:rgba(250,250,247,.9)!important;border-color:#D4D4D0!important}
html[data-theme="light"] .bg-white,html[data-theme="light"] .bg-gray-50,html[data-theme="light"] .bg-gray-100,html[data-theme="light"] .dark\\:bg-gray-700,html[data-theme="light"] .dark\\:bg-gray-800,html[data-theme="light"] .dark\\:bg-gray-900,html[data-theme="light"] .bg-background{background-color:#FFFFFF!important}html[data-theme="light"] .text-gray-900,html[data-theme="light"] .dark\\:text-white,html[data-theme="light"] .dark\\:text-gray-100,html[data-theme="light"] .text-foreground{color:#0A0A0A!important}html[data-theme="light"] .text-gray-700,html[data-theme="light"] .text-gray-600,html[data-theme="light"] .dark\\:text-gray-300,html[data-theme="light"] .dark\\:text-gray-400,html[data-theme="light"] .text-muted-foreground{color:#696966!important}
html[data-theme="light"] .search-container input,html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#FFFFFF!important;color:#0A0A0A!important;border-color:#D4D4D0!important;box-shadow:0 1px 2px rgba(54,45,30,.04)!important}html[data-theme="light"] .results-wrapper,html[data-theme="light"] .empty-state,html[data-theme="light"] .loading-state,html[data-theme="light"] .error-state,html[data-theme="light"] .result-card,html[data-theme="light"] [class*="result-card"],html[data-theme="light"] [class*="resource-card"],html[data-theme="light"] [class*="filter-panel"],html[data-theme="light"] [class*="filter-section"],html[data-theme="light"] .card,html[data-theme="light"] .results-container{background:#FFFFFF!important;border-color:#D4D4D0!important;color:#0A0A0A!important;box-shadow:0 1px 2px rgba(54,45,30,.04),0 8px 24px rgba(54,45,30,.035)!important}html[data-theme="light"] .result-item{background:#FAFAF7!important;border-color:#e3e1db!important}html[data-theme="light"] .result-title-button,html[data-theme="light"] .result-title{color:#0A0A0A!important}html[data-theme="light"] *{scrollbar-color:#c8c3b9 #F7F6F2}
html.aio-embed[data-theme="light"] .app-shell{background:#FAFAF7!important}
html.aio-embed[data-theme="light"] .empty-state,html.aio-embed[data-theme="light"] .results-wrapper:has(.empty-state){background:transparent!important;border:0!important;box-shadow:none!important}
