/* GoodWatch Theme: System-Adaptive + Manual Toggle */
:root{--gwt-bg:10 10 10;--gwt-surface:28 28 30;--gwt-text:250 250 250;--gwt-text-muted:142 142 147;--gwt-border:38 38 38;--gwt-accent:212 175 55;--gwt-accent-hover:201 162 39;}
[data-theme="light"]{--gwt-bg:242 242 247;--gwt-surface:255 255 255;--gwt-text:28 28 30;--gwt-text-muted:107 114 128;--gwt-border:209 213 219;--gwt-accent:184 134 11;--gwt-accent-hover:161 117 10;}
@media(prefers-color-scheme:light){:root:not([data-theme="dark"]){--gwt-bg:242 242 247;--gwt-surface:255 255 255;--gwt-text:28 28 30;--gwt-text-muted:107 114 128;--gwt-border:209 213 219;--gwt-accent:184 134 11;--gwt-accent-hover:161 117 10;}}

/* Override Tailwind gw-* utility classes */
.bg-gw-bg{background-color:rgb(var(--gwt-bg))!important}
.bg-gw-bg\/50{background-color:rgb(var(--gwt-bg)/0.5)!important}
.bg-gw-bg\/80{background-color:rgb(var(--gwt-bg)/0.8)!important}
.bg-gw-surface{background-color:rgb(var(--gwt-surface))!important}
.bg-gw-accent{background-color:rgb(var(--gwt-accent))!important}
.bg-gw-accent\/10{background-color:rgb(var(--gwt-accent)/0.1)!important}
.bg-gw-accent\/20{background-color:rgb(var(--gwt-accent)/0.2)!important}
.text-gw-text{color:rgb(var(--gwt-text))!important}
.text-gw-text-muted{color:rgb(var(--gwt-text-muted))!important}
.text-gw-accent{color:rgb(var(--gwt-accent))!important}
.text-gw-border{color:rgb(var(--gwt-border))!important}
.border-gw-border{border-color:rgb(var(--gwt-border))!important}
.border-gw-accent\/30{border-color:rgb(var(--gwt-accent)/0.3)!important}
.hover\:bg-gw-accent-hover:hover{background-color:rgb(var(--gwt-accent-hover))!important}
.hover\:bg-gw-border:hover{background-color:rgb(var(--gwt-border))!important}
.hover\:border-gw-accent\/30:hover{border-color:rgb(var(--gwt-accent)/0.3)!important}
.hover\:border-gw-accent:hover{border-color:rgb(var(--gwt-accent))!important}
.hover\:text-gw-accent:hover{color:rgb(var(--gwt-accent))!important}
.hover\:text-gw-accent-hover:hover{color:rgb(var(--gwt-accent-hover))!important}
.hover\:text-gw-text:hover{color:rgb(var(--gwt-text))!important}
.focus\:ring-gw-accent:focus{--tw-ring-color:rgb(var(--gwt-accent))!important}
.placeholder\:text-gw-text-muted::placeholder{color:rgb(var(--gwt-text-muted))!important}
.placeholder\:text-gw-text-muted::-moz-placeholder{color:rgb(var(--gwt-text-muted))!important}
.group:hover .group-hover\:text-gw-accent{color:rgb(var(--gwt-accent))!important}

/* Gradient overrides */
.from-gw-accent\/10{--tw-gradient-from:rgb(var(--gwt-accent)/0.1) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--gwt-accent)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
.from-gw-accent\/20{--tw-gradient-from:rgb(var(--gwt-accent)/0.2) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--gwt-accent)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
.from-gw-bg\/60{--tw-gradient-from:rgb(var(--gwt-bg)/0.6) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--gwt-bg)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
.via-gw-bg\/80{--tw-gradient-to:rgb(var(--gwt-bg)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgb(var(--gwt-bg)/0.8) var(--tw-gradient-via-position),var(--tw-gradient-to)}
.to-gw-bg{--tw-gradient-to:rgb(var(--gwt-bg)) var(--tw-gradient-to-position)}
.to-gw-surface{--tw-gradient-to:rgb(var(--gwt-surface)) var(--tw-gradient-to-position)}

/* Scrollbar */
::-webkit-scrollbar-track{background:rgb(var(--gwt-bg))!important}
::-webkit-scrollbar-thumb{background:rgb(var(--gwt-border))!important}
@supports(scrollbar-color:auto){*{scrollbar-color:rgb(var(--gwt-border)) rgb(var(--gwt-bg))!important}}

/* Selection */
::selection{background-color:rgb(var(--gwt-accent)/0.3)!important;color:rgb(var(--gwt-text))!important}
::-moz-selection{background-color:rgb(var(--gwt-accent)/0.3)!important;color:rgb(var(--gwt-text))!important}

/* Smooth transition */
body{transition:background-color 0.3s,color 0.3s}

/* Floating toggle button */
.gw-theme-toggle{position:fixed;bottom:24px;right:24px;z-index:60;width:44px;height:44px;border-radius:50%;background:rgb(var(--gwt-surface));border:1px solid rgb(var(--gwt-border));cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:20px;box-shadow:0 4px 12px rgba(0,0,0,0.15);transition:background 0.2s,border-color 0.2s;padding:0;font-family:inherit;color:rgb(var(--gwt-text))}
.gw-theme-toggle:hover{border-color:rgb(var(--gwt-accent))}

/* Logo always in dark container (gold film strip on black) */
img[alt="GoodWatch Logo"]{background:#0A0A0A;border-radius:12px;padding:3px}

/* Explore page theme-adaptive overrides */
.skeleton{background:linear-gradient(90deg,rgb(var(--gwt-surface)) 25%,rgb(var(--gwt-border)) 50%,rgb(var(--gwt-surface)) 75%)!important;background-size:200%!important}
.poster-fallback{background:rgb(var(--gwt-surface))!important}
.filter-chip-active{background:rgb(var(--gwt-accent)/0.15)!important;border-color:rgb(var(--gwt-accent))!important;color:rgb(var(--gwt-accent))!important}
.type-active{background:rgb(var(--gwt-accent)/0.15)!important;color:rgb(var(--gwt-accent))!important;border-color:rgb(var(--gwt-accent))!important}
.section-inactive{background:rgb(var(--gwt-surface))!important;color:rgb(var(--gwt-text-muted))!important;border-color:rgb(var(--gwt-border))!important}
.auth-gate-overlay{background:rgba(0,0,0,0.6)!important}
.auth-gate-card{background:rgb(var(--gwt-surface))!important;border-color:rgb(var(--gwt-border))!important}
