body.ts-has-ambient { isolation: isolate; }
body.ts-has-ambient > #main-content { position: relative; z-index: 1; }
body.ts-has-ambient > .ts-footer { position: relative; z-index: 1; }
.ts-ambient { --sun-x: 65vw; --sun-y: 15vh; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; background: #06172d; }
.ts-ambient[hidden], .ts-ambient-controls[hidden] { display: none !important; }
.ts-ambient > div, .ts-ambient canvas { position: absolute; pointer-events: none; }
.ts-ambient__sky, .ts-ambient__veil, .ts-ambient__stars, .ts-ambient__horizon { inset: 0; }
.ts-ambient__sky { background: radial-gradient(ellipse at 75% 10%, #21445f, transparent 65%), linear-gradient(#102b4a, #07182e 75%); transition: background 12s, opacity 12s; }
.ts-ambient[data-phase="night"] .ts-ambient__sky { background: radial-gradient(ellipse at 70% 0%, #1c2445, transparent 70%), linear-gradient(#070f24, #0d1c32); }
.ts-ambient[data-phase="sunrise"] .ts-ambient__sky,
.ts-ambient[data-phase="sunset"] .ts-ambient__sky { background: radial-gradient(ellipse at 65% 50%, #754e59, transparent 65%), linear-gradient(#152d50, #423752 60%, #91644e); }
.ts-ambient__horizon { top: 65%; background: radial-gradient(ellipse at 70% 100%, #567d9c45, transparent 72%); filter: blur(30px); }
.ts-ambient__sun { left: 0; top: 0; width: clamp(160px, 27vw, 400px); aspect-ratio: 1; transform: translate3d(var(--sun-x), var(--sun-y), 0) translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff7ce20 10%, #f7bf7920 25%, #e5bd5b08 52%, transparent 70%); transition: transform 60s linear, opacity 15s; }
.ts-ambient__sun i { position: absolute; inset: 40%; border-radius: 50%; background: #fff3c8; box-shadow: 0 0 36px 8px #ffe6a455, 0 0 90px 18px #f9d9a21f; opacity: .52; }
.ts-ambient__moon { right: 15%; top: 13%; width: 35px; height: 35px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #eef4ff, #a9bdd5); box-shadow: 0 0 45px 15px #9fb6d214; opacity: 0; transition: opacity 15s; }
.ts-ambient__stars { opacity: 0; background-image: radial-gradient(1px 1px at 12% 12%, #eef3ff99 90%, transparent), radial-gradient(1px 1px at 63% 9%, #eef3ff77 90%, transparent), radial-gradient(1px 1px at 85% 35%, #eef3ff99 90%, transparent), radial-gradient(1px 1px at 40% 27%, #eef3ff66 90%, transparent); background-size: 311px 281px, 443px 379px, 293px 449px, 577px 383px; transition: opacity 15s; }
.ts-ambient[data-phase="night"] .ts-ambient__stars { opacity: .65; }
.ts-ambient[data-phase="night"] .ts-ambient__moon { opacity: .5; }
.ts-ambient[data-phase="night"] .ts-ambient__sun { opacity: 0; }
.ts-ambient__cloud { width: min(90vw, 1100px); height: 220px; border-radius: 50%; background: radial-gradient(ellipse at 35% 50%, #c8d7e918, transparent 60%), radial-gradient(ellipse at 70% 55%, #b4c8db18, transparent 60%); filter: blur(24px); opacity: .3; animation: ts-sky-drift 110s ease-in-out infinite alternate; }
.ts-ambient__cloud--one { top: 6%; left: -10%; }
.ts-ambient__cloud--two { top: 34%; right: -28%; animation-delay: -50s; animation-duration: 150s; }
.ts-ambient[data-weather="cloudy"] .ts-ambient__cloud,
.ts-ambient[data-weather="rain"] .ts-ambient__cloud,
.ts-ambient[data-weather="snow"] .ts-ambient__cloud,
.ts-ambient[data-weather="fog"] .ts-ambient__cloud { opacity: 1; }
.ts-ambient[data-weather="rain"] .ts-ambient__sun,
.ts-ambient[data-weather="snow"] .ts-ambient__sun,
.ts-ambient[data-weather="fog"] .ts-ambient__sun { opacity: .15; }
.ts-ambient[data-weather="rain"] .ts-ambient__stars,
.ts-ambient[data-weather="snow"] .ts-ambient__stars,
.ts-ambient[data-weather="cloudy"] .ts-ambient__stars { opacity: .1; }
.ts-ambient__particles { inset: 0; width: 100%; height: 100%; opacity: .35; }
.ts-ambient__veil { background: linear-gradient(#00112c20, #00112c55 35%, #00112c80 85%); }
.white-mode .ts-ambient { background: #eaf0fa; }
.white-mode .ts-ambient__sky { background: linear-gradient(#a9cfee, #eff5fc); opacity: 1; }
.white-mode .ts-ambient[data-phase="day"] .ts-ambient__sky { background: linear-gradient(#9bcbed, #e9f3fb 80%); }
.white-mode .ts-ambient[data-phase="night"] .ts-ambient__sky { background: linear-gradient(#becbe3, #eaf0fa 85%); }
.white-mode .ts-ambient[data-phase="sunrise"] .ts-ambient__sky,
.white-mode .ts-ambient[data-phase="sunset"] .ts-ambient__sky { background: linear-gradient(#becfe9, #f4e1de 65%, #fae9d4); }
.white-mode .ts-ambient__veil { background: linear-gradient(#f5f7fb12, #f5f7fb55 45%, #eaf0facc); }
.white-mode .ts-ambient__sun i { background: #fff2b6; box-shadow: 0 0 32px 10px #ffdf8d88; opacity: .9; }
.white-mode .ts-ambient__moon { background: #fff; opacity: 0; }
.white-mode .ts-ambient[data-phase="night"] .ts-ambient__moon { opacity: .8; }
html.white-mode body.ts-has-ambient .ts-top-movies { background: transparent !important; }
.white-mode .ts-ambient__cloud { background: radial-gradient(ellipse, #ffffffcc, transparent 65%); }
.white-mode .ts-ambient__particles { opacity: .24; }
.ts-ambient.is-paused *, .ts-ambient.is-still * { animation-play-state: paused !important; }
.ts-ambient .ts-ambient__sun { transition: opacity 15s; }
.ts-ambient.is-still .ts-ambient__sun { transition: none; }
.ts-hall3d-open .ts-ambient { visibility: hidden; }
.ts-ambient-controls { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 18px; padding: 18px 20px 24px; font: 12px/1.6 system-ui, sans-serif; color: #a5b5ce; }
.ts-ambient-controls button { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 10px 16px; border: 1px solid #7188a64d; border-radius: 24px; background: #152a43; color: #dbe6f6; font: inherit; cursor: pointer; }
.ts-ambient-controls button[aria-pressed="false"] { opacity: .65; }
.ts-ambient-controls small { font-size: 11px; }
.ts-ambient-controls a { color: inherit; text-decoration: underline; }
.ts-ambient-controls :focus-visible { outline: 3px solid #58b9f4; outline-offset: 4px; }
.white-mode .ts-ambient-controls { color: #4c5e78; }
.white-mode .ts-ambient-controls button { color: #204866; background: #e7f0fb; border-color: #7a9cbe66; }
@keyframes ts-sky-drift { from { transform: translateX(-3%); } to { transform: translateX(12%); } }
@media (max-width: 767px) {
    .ts-ambient__sun { width: clamp(128px, 36vw, 170px); }
    .ts-ambient__sun i { box-shadow: 0 0 24px 6px #ffe6a43d, 0 0 60px 12px #f9d9a214; }
    .ts-ambient__moon { width: 25px; height: 25px; right: 12%; top: 23%; }
    .ts-ambient__cloud { width: 115vw; height: 125px; filter: blur(16px); }
    .ts-ambient__cloud--one { top: 17%; left: -35%; }
    .ts-ambient__cloud--two { top: 58%; right: -45%; }
    .ts-ambient__horizon { top: 78%; filter: blur(20px); }
    .ts-ambient__veil { background: linear-gradient(#00112c18, #00112c44 35%, #00112c99 90%); }
    .ts-ambient__particles { opacity: .24; }
    .white-mode .ts-ambient__veil { background: linear-gradient(#f5f7fb22, #f5f7fb77 45%, #eaf0fae6); }
    .white-mode .ts-ambient__sun i { box-shadow: 0 0 24px 7px #ffdf8d66; }
    .white-mode .ts-ambient__particles { opacity: .18; }
    body.ts-has-ambient .header-section { background: rgba(0, 18, 50, .93) !important; }
    html.white-mode body.ts-has-ambient .header-section { background: rgba(248, 251, 255, .94) !important; }
    @supports (backdrop-filter: blur(12px)) {
        body.ts-has-ambient .header-section { background: rgba(0, 18, 50, .8) !important; backdrop-filter: blur(12px); }
        html.white-mode body.ts-has-ambient .header-section { background: rgba(248, 251, 255, .86) !important; }
    }
}
@media (prefers-reduced-motion: reduce) {
    .ts-ambient * { animation: none !important; transition: none !important; }
    .ts-ambient__particles { display: none; }
}
