/* ═══════════════════════════════════════════════════════════════════════════
   VISION MODE STYLES
   Star Wars-style crawl effect and 3D slider controller
   Extracted from index.html for better caching and reduced initial load
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   VISION CONTAINER - Full Screen Overlay
   ═══════════════════════════════════════════════════════════════════ */
#vision-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
    /* Dark theme - deep space black */
    background: radial-gradient(ellipse at 50% 50%, #0a0a12 0%, #000 100%);
}

#vision-container.active {
    opacity: 1;
    visibility: visible;
}

/* Light theme - clean light background */
html.theme-light #vision-container {
    background: radial-gradient(ellipse at 50% 50%, #ffffff 0%, #f0f2f5 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   VIGNETTE OVERLAY - Subtle depth effect
   ═══════════════════════════════════════════════════════════════════ */
#vision-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    /* Dark vignette */
    background: radial-gradient(ellipse at 50% 50%,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.3) 100%);
}

html.theme-light #vision-container::before {
    background: radial-gradient(ellipse at 50% 50%,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.08) 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   PERSPECTIVE WRAPPER
   ═══════════════════════════════════════════════════════════════════ */
.vision-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    /* Use most of screen width - caps at reasonable max for large screens */
    max-width: min(90vw, 800px);
    height: 100%;
    /* Consistent perspective at all screen sizes for true Star Wars effect */
    perspective: 800px;
    perspective-origin: 50% 20%;
    /* Responsive padding: minimal on small screens, more on large */
    padding: 0 clamp(8px, 3vw, 40px);
    box-sizing: border-box;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════════
   CRAWLING TEXT
   ═══════════════════════════════════════════════════════════════════ */
.vision-crawl-text {
    position: absolute;
    top: calc(100% - 100px);
    left: 0;
    right: 0;
    /* Minimal padding - let inner content handle spacing */
    padding: 0;
    transform-style: preserve-3d;
    /* Consistent Star Wars angle at all screen sizes */
    transform: rotateX(38deg);
    transform-origin: 50% 0%;
    animation: crawlUp 180s linear forwards;
    animation-play-state: running;
}

#vision-container.paused .vision-crawl-text {
    animation-play-state: paused;
}

@keyframes crawlUp {
    0% { top: calc(100% - 100px); }
    100% { top: -200%; }  /* Reduced travel = text doesn't get as close/big */
}

/* ═══════════════════════════════════════════════════════════════════
   TITLE - Refined Typography with subtle glow
   ═══════════════════════════════════════════════════════════════════ */
.vision-title {
    font-family: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Fluid font size: smaller minimum for small screens */
    font-size: clamp(0.85rem, 3.5vw, 1.75rem);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 clamp(20px, 5vw, 40px) 0;
    line-height: 1.2;
    color: #fac929;
    text-shadow:
        0 0 40px rgba(250, 201, 41, 0.2),
        0 0 80px rgba(250, 201, 41, 0.08),
        0 2px 12px rgba(0, 0, 0, 0.4);
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow:
            0 0 60px rgba(250, 201, 41, 0.25),
            0 0 120px rgba(250, 201, 41, 0.1),
            0 4px 20px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow:
            0 0 80px rgba(250, 201, 41, 0.35),
            0 0 140px rgba(250, 201, 41, 0.15),
            0 4px 20px rgba(0, 0, 0, 0.5);
    }
}

/* Light theme - blue accent */
html.theme-light .vision-title {
    color: #1565d8;
    text-shadow:
        0 0 60px rgba(21, 101, 216, 0.2),
        0 0 120px rgba(21, 101, 216, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.15);
    animation: titleGlowLight 4s ease-in-out infinite;
}

@keyframes titleGlowLight {
    0%, 100% {
        text-shadow:
            0 0 60px rgba(21, 101, 216, 0.2),
            0 0 120px rgba(21, 101, 216, 0.08),
            0 4px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        text-shadow:
            0 0 80px rgba(21, 101, 216, 0.28),
            0 0 140px rgba(21, 101, 216, 0.12),
            0 4px 20px rgba(0, 0, 0, 0.15);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   BODY TEXT - Elegant & Readable
   ═══════════════════════════════════════════════════════════════════ */
.vision-body {
    text-align: center;
    /* Fluid width that uses most of the available wrapper space
       As text magnifies via perspective, shorter lines ensure fit */
    max-width: clamp(200px, 70vw, 600px);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(4px, 2vw, 16px);
    box-sizing: border-box;
}

.vision-body p {
    font-family: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Fluid font size: starts small so text is readable when it first appears */
    font-size: clamp(0.68rem, 1.8vw, 1.05rem);
    font-weight: 400;
    line-height: 1.65;
    margin: 0 0 clamp(14px, 3vw, 32px) 0;
    letter-spacing: 0.005em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
    /* Prevent text overflow on narrow screens */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.vision-body p:last-child {
    margin-bottom: clamp(60px, 15vw, 120px);
}

html.theme-light .vision-body p {
    color: rgba(20, 30, 48, 0.88);
    text-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════
   FADE GRADIENTS - Top and Bottom (creates the infinite scroll feel)
   ═══════════════════════════════════════════════════════════════════ */
.vision-fade-top,
.vision-fade-bottom {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 5;
}

.vision-fade-top {
    top: 0;
    height: 20%;
    /* Dark theme - matches radial background */
    background: linear-gradient(to bottom,
        rgba(5, 5, 10, 1) 0%,
        rgba(5, 5, 10, 0.85) 40%,
        rgba(5, 5, 10, 0) 100%);
}

.vision-fade-bottom {
    bottom: 0;
    height: 25%;
    /* Dark theme - matches radial background */
    background: linear-gradient(to top,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0) 100%);
}

/* Light theme gradients */
html.theme-light .vision-fade-top {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.85) 40%,
        rgba(255, 255, 255, 0) 100%);
}

html.theme-light .vision-fade-bottom {
    background: linear-gradient(to top,
        rgba(240, 242, 245, 1) 0%,
        rgba(240, 242, 245, 0.9) 35%,
        rgba(240, 242, 245, 0) 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   BACK BUTTON
   ═══════════════════════════════════════════════════════════════════ */
.vision-back-btn {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    z-index: 10001;

    /* Reset */
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;

    /* Typography */
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;

    /* Spacing */
    padding: 14px 36px;

    /* Appearance */
    border-radius: 6px;
    opacity: 0;
    transition: all 0.4s ease;

    /* Dark theme */
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

#vision-container.active .vision-back-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition-delay: 1s;
}

.vision-back-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.vision-back-btn:active {
    transform: translateX(-50%) translateY(2px);
    transition-delay: 0s;
}

/* Light theme back button */
html.theme-light .vision-back-btn {
    color: rgba(20, 30, 48, 0.7);
    border-color: rgba(20, 30, 48, 0.15);
    background: rgba(20, 30, 48, 0.03);
}

html.theme-light .vision-back-btn:hover {
    color: rgba(20, 30, 48, 0.95);
    border-color: rgba(20, 30, 48, 0.25);
    background: rgba(20, 30, 48, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE STATES
   ═══════════════════════════════════════════════════════════════════ */
#landing-page-content.vision-active {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.6s ease !important;
}

#background-images-layer.vision-active {
    opacity: 0 !important;
    transition: opacity 0.6s ease !important;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE - Mobile Overrides (keep 3D effect, narrow text for magnification)
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet: adjust button position */
@media (max-width: 768px) {
    .vision-back-btn {
        bottom: 24px;
    }
}

/* Mobile: narrow text to account for perspective magnification */
@media (max-width: 480px) {
    .vision-body {
        /* Narrower text so magnification doesn't overflow */
        max-width: 55vw;
    }

    .vision-body p {
        font-size: clamp(0.6rem, 1.6vw, 0.9rem);
    }

    .vision-title {
        font-size: clamp(0.75rem, 3vw, 1.4rem);
    }

    .vision-back-btn {
        bottom: 20px;
        font-size: 13px;
    }
}

/* Small mobile: even narrower for heavy magnification at scroll end */
@media (max-width: 400px) {
    .vision-body {
        max-width: 48vw;
    }

    .vision-body p {
        font-size: clamp(0.55rem, 1.4vw, 0.85rem);
    }

    .vision-title {
        font-size: clamp(0.7rem, 2.8vw, 1.3rem);
    }
}

/* Very small screens: narrowest text for maximum magnification tolerance */
@media (max-width: 360px) {
    .vision-body {
        max-width: 42vw;
    }

    .vision-body p {
        font-size: clamp(0.5rem, 1.2vw, 0.8rem);
    }

    .vision-title {
        font-size: clamp(0.65rem, 2.5vw, 1.2rem);
    }
}

/* PWA safe areas */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .vision-back-btn {
        bottom: calc(28px + env(safe-area-inset-bottom));
    }

    @media (max-width: 768px) {
        .vision-back-btn {
            bottom: calc(24px + env(safe-area-inset-bottom));
        }
    }

    @media (max-width: 480px) {
        .vision-back-btn {
            bottom: calc(20px + env(safe-area-inset-bottom));
        }
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .vision-crawl-text {
        animation-duration: 135s;
    }

    #vision-container,
    .vision-back-btn {
        transition-duration: 0.2s;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   VISION SLIDER - 3D Crawl Position Controller Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   SLIDER CONTAINER
   ═══════════════════════════════════════════════════════════════════ */
.vision-slider-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, right 0.5s cubic-bezier(0.4, 0, 0.2, 1), left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.vision-slider-container.visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    animation: sliderFadeIn 0.6s ease-out forwards;
}

/* Left position (mobile only) */
.vision-slider-container.position-left {
    right: auto;
    left: 20px;
}

/* Animation only when BOTH visible AND position-left - prevents lingering on hide */
.vision-slider-container.visible.position-left {
    animation: sliderFadeInLeft 0.5s ease-out forwards;
}

@keyframes sliderFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes sliderFadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Desktop - more padding from edge */
@media (min-width: 1200px) {
    .vision-slider-container {
        right: 60px;
    }
}

@media (min-width: 1600px) {
    .vision-slider-container {
        right: 100px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER WRAPPER - Glassmorphic Container (More Transparent)
   ═══════════════════════════════════════════════════════════════════ */
.vision-slider-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* iOS Safari fix - disable backdrop blur on touch devices to prevent glass effect */
@supports (-webkit-touch-callout: none) {
    .vision-slider-wrapper {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    html.theme-dark .vision-slider-wrapper {
        background: rgba(0, 0, 0, 0.75);
    }
    html.theme-light .vision-slider-wrapper {
        background: rgba(255, 255, 255, 0.85);
    }
}

/* Dark Theme - More Transparent */
html.theme-dark .vision-slider-wrapper {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 212, 255, 0.08),
        inset 0 0 20px rgba(0, 212, 255, 0.02);
}

html.theme-dark .vision-slider-wrapper:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(0, 212, 255, 0.35);
}

/* Light Theme - More Transparent */
html.theme-light .vision-slider-wrapper {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(31, 117, 254, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(31, 117, 254, 0.06),
        inset 0 0 20px rgba(31, 117, 254, 0.02);
}

html.theme-light .vision-slider-wrapper:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(31, 117, 254, 0.35);
}

/* ═══════════════════════════════════════════════════════════════════
   POSITION TOGGLE ARROW (Mobile Only)
   ═══════════════════════════════════════════════════════════════════ */
.slider-position-toggle {
    display: none;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-position-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

html.theme-dark .slider-position-toggle {
    background: rgba(0, 0, 0, 0.5);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

html.theme-dark .slider-position-toggle:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
}

html.theme-light .slider-position-toggle {
    background: rgba(255, 255, 255, 0.7);
    color: #1F75FE;
    border: 1px solid rgba(31, 117, 254, 0.3);
    box-shadow: 0 0 15px rgba(31, 117, 254, 0.15);
}

html.theme-light .slider-position-toggle:hover {
    background: rgba(31, 117, 254, 0.1);
    border-color: rgba(31, 117, 254, 0.5);
}

/* Arrow flips when on left side */
.vision-slider-container.position-left .slider-position-toggle svg {
    transform: rotate(180deg);
}

/* Show toggle only on mobile */
@media (max-width: 768px) {
    .slider-position-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   THREE.JS CANVAS CONTAINER
   ═══════════════════════════════════════════════════════════════════ */
.slider-three-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 24px;
    overflow: hidden;
    opacity: 0.5;
    z-index: 0;
}

.slider-three-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   GLOW ACCENT - Decorative Element
   ═══════════════════════════════════════════════════════════════════ */
.slider-glow-accent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 40%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(20px);
    opacity: 0.3;
    animation: glowPulse 4s ease-in-out infinite;
}

html.theme-dark .slider-glow-accent {
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.4) 0%, transparent 70%);
}

html.theme-light .slider-glow-accent {
    background: radial-gradient(ellipse, rgba(31, 117, 254, 0.3) 0%, transparent 70%);
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER LABELS
   ═══════════════════════════════════════════════════════════════════ */
.slider-label {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.45;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 1;
}

.vision-slider-wrapper:hover .slider-label {
    opacity: 0.7;
}

html.theme-dark .slider-label {
    color: #00d4ff;
}

html.theme-light .slider-label {
    color: #1F75FE;
}

/* ═══════════════════════════════════════════════════════════════════
   TRACK OVERLAY
   ═══════════════════════════════════════════════════════════════════ */
.slider-track-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER TRACK
   ═══════════════════════════════════════════════════════════════════ */
.slider-track {
    position: relative;
    width: 5px;
    height: 280px;
    border-radius: 3px;
    cursor: pointer;
    overflow: visible;
}

html.theme-dark .slider-track {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

html.theme-light .slider-track {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER FILL
   ═══════════════════════════════════════════════════════════════════ */
.slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    border-radius: 3px;
    transition: height 0.08s ease-out;
}

html.theme-dark .slider-fill {
    background: linear-gradient(to top, #00d4ff, #00a8cc);
    box-shadow:
        0 0 10px rgba(0, 212, 255, 0.6),
        0 0 20px rgba(0, 212, 255, 0.35);
}

html.theme-light .slider-fill {
    background: linear-gradient(to top, #1F75FE, #1565D8);
    box-shadow:
        0 0 10px rgba(31, 117, 254, 0.5),
        0 0 20px rgba(31, 117, 254, 0.25);
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER HANDLE
   ═══════════════════════════════════════════════════════════════════ */
.slider-handle {
    position: absolute;
    left: 50%;
    bottom: 0%;
    transform: translate(-50%, 50%);
    width: 26px;
    height: 26px;
    cursor: grab;
    z-index: 10;
    transition: transform 0.15s ease-out;
    --glow-intensity: 0.5;
}

.slider-handle:hover {
    transform: translate(-50%, 50%) scale(1.1);
}

.slider-handle.dragging {
    cursor: grabbing;
    transform: translate(-50%, 50%) scale(1.15);
}

.slider-handle:focus {
    outline: none;
}

.slider-handle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 50%;
}

/* ═══════════════════════════════════════════════════════════════════
   HANDLE RINGS - Animated Concentric Circles
   ═══════════════════════════════════════════════════════════════════ */
.handle-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid;
    animation: ringPulse 2s ease-in-out infinite;
}

html.theme-dark .handle-ring {
    border-color: rgba(0, 212, 255, 0.45);
}

html.theme-light .handle-ring {
    border-color: rgba(31, 117, 254, 0.45);
}

.handle-ring-outer {
    width: 26px;
    height: 26px;
    animation-delay: 0s;
}

.handle-ring-inner {
    width: 18px;
    height: 18px;
    animation-delay: 0.5s;
}

.slider-handle:hover .handle-ring,
.slider-handle.dragging .handle-ring {
    animation-duration: 1s;
}

html.theme-dark .slider-handle:hover .handle-ring,
html.theme-dark .slider-handle.dragging .handle-ring {
    border-color: rgba(0, 212, 255, 0.85);
}

html.theme-light .slider-handle:hover .handle-ring,
html.theme-light .slider-handle.dragging .handle-ring {
    border-color: rgba(31, 117, 254, 0.85);
}

@keyframes ringPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   HANDLE CORE - Center Dot
   ═══════════════════════════════════════════════════════════════════ */
.handle-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

html.theme-dark .handle-core {
    background: #00d4ff;
    box-shadow:
        0 0 10px rgba(0, 212, 255, calc(var(--glow-intensity) * 1)),
        0 0 20px rgba(0, 212, 255, calc(var(--glow-intensity) * 0.6)),
        0 0 30px rgba(0, 212, 255, calc(var(--glow-intensity) * 0.3));
}

html.theme-light .handle-core {
    background: #1F75FE;
    box-shadow:
        0 0 10px rgba(31, 117, 254, calc(var(--glow-intensity) * 0.8)),
        0 0 20px rgba(31, 117, 254, calc(var(--glow-intensity) * 0.5)),
        0 0 30px rgba(31, 117, 254, calc(var(--glow-intensity) * 0.25));
}

.slider-handle:hover .handle-core,
.slider-handle.dragging .handle-core {
    transform: translate(-50%, -50%) scale(1.2);
}

html.theme-dark .slider-handle:hover .handle-core,
html.theme-dark .slider-handle.dragging .handle-core {
    box-shadow:
        0 0 15px rgba(0, 212, 255, 1),
        0 0 30px rgba(0, 212, 255, 0.8),
        0 0 45px rgba(0, 212, 255, 0.5);
}

html.theme-light .slider-handle:hover .handle-core,
html.theme-light .slider-handle.dragging .handle-core {
    box-shadow:
        0 0 15px rgba(31, 117, 254, 0.9),
        0 0 30px rgba(31, 117, 254, 0.6),
        0 0 45px rgba(31, 117, 254, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   HANDLE PULSE - Expanding Ring Animation
   ═══════════════════════════════════════════════════════════════════ */
.handle-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    animation: handlePulseExpand 2s ease-out infinite;
    pointer-events: none;
}

html.theme-dark .handle-pulse {
    border: 1px solid rgba(0, 212, 255, 0.6);
}

html.theme-light .handle-pulse {
    border: 1px solid rgba(31, 117, 254, 0.6);
}

@keyframes handlePulseExpand {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.slider-handle:hover .handle-pulse,
.slider-handle.dragging .handle-pulse {
    animation-duration: 1s;
}

/* ═══════════════════════════════════════════════════════════════════
   PROGRESS TEXT
   ═══════════════════════════════════════════════════════════════════ */
.slider-progress-text {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 10px;
    font-weight: 500;
    opacity: 0.6;
    text-align: center;
    min-width: 36px;
}

html.theme-dark .slider-progress-text {
    color: #00d4ff;
}

html.theme-light .slider-progress-text {
    color: #1F75FE;
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER MARKERS - Section Indicators
   ═══════════════════════════════════════════════════════════════════ */
.slider-markers {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    height: 280px;
    padding: 10px 0;
}

.slider-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

html.theme-dark .slider-marker {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

html.theme-light .slider-marker {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(31, 117, 254, 0.3);
}

.slider-marker:hover {
    transform: scale(1.3);
}

html.theme-dark .slider-marker:hover {
    background: rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.6);
}

html.theme-light .slider-marker:hover {
    background: rgba(31, 117, 254, 0.2);
    border-color: rgba(31, 117, 254, 0.6);
}

.slider-marker.active {
    transform: scale(1.2);
}

html.theme-dark .slider-marker.active {
    background: #00d4ff;
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

html.theme-light .slider-marker.active {
    background: #1F75FE;
    border-color: #1F75FE;
    box-shadow: 0 0 8px rgba(31, 117, 254, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE STYLES - Thinner Design
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .vision-slider-container {
        right: 10px;
    }

    .vision-slider-wrapper {
        padding: 14px 10px;
        border-radius: 22px;
        gap: 10px;
    }

    .slider-three-canvas {
        border-radius: 22px;
    }

    .slider-track {
        width: 4px;
        height: 200px;
    }

    .slider-markers {
        height: 200px;
        padding: 8px 0;
    }

    .slider-marker {
        width: 6px;
        height: 6px;
    }

    .slider-handle {
        width: 22px;
        height: 22px;
    }

    .handle-ring-outer {
        width: 22px;
        height: 22px;
    }

    .handle-ring-inner {
        width: 14px;
        height: 14px;
    }

    .handle-core {
        width: 7px;
        height: 7px;
    }

    .handle-pulse {
        width: 22px;
        height: 22px;
    }

    .slider-label {
        font-size: 7px;
        letter-spacing: 1.2px;
    }

    .slider-progress-text {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .vision-slider-container {
        right: 6px;
    }

    .vision-slider-wrapper {
        padding: 12px 8px;
        border-radius: 18px;
        gap: 8px;
    }

    .slider-three-canvas {
        border-radius: 18px;
    }

    .slider-track {
        width: 3px;
        height: 160px;
    }

    .slider-markers {
        height: 160px;
        padding: 6px 0;
    }

    .slider-marker {
        width: 5px;
        height: 5px;
    }

    .slider-handle {
        width: 18px;
        height: 18px;
    }

    .handle-ring-outer {
        width: 18px;
        height: 18px;
    }

    .handle-ring-inner {
        width: 12px;
        height: 12px;
    }

    .handle-core {
        width: 6px;
        height: 6px;
    }

    .handle-pulse {
        width: 18px;
        height: 18px;
    }

    .slider-label {
        font-size: 6px;
        letter-spacing: 1px;
    }

    .slider-progress-text {
        font-size: 8px;
        min-width: 30px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .vision-slider-container {
        animation: none;
    }

    .vision-slider-container.visible {
        animation: none;
        opacity: 1;
        transform: translateY(-50%);
    }

    .handle-ring {
        animation: none;
    }

    .slider-fill {
        transition: none;
    }

    .slider-handle {
        transition: none;
    }

    .slider-marker {
        transition: none;
    }

    .handle-core {
        transition: none;
    }

    .handle-pulse {
        animation: none;
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PWA STANDALONE
   ═══════════════════════════════════════════════════════════════════ */
@media (display-mode: standalone) {
    .vision-slider-container {
        right: max(20px, env(safe-area-inset-right, 20px));
    }

    @media (min-width: 1200px) {
        .vision-slider-container {
            right: max(60px, env(safe-area-inset-right, 60px));
        }
    }
}
