/* ============================================
   ADVANCED FEATURES - PREMIUM EXPERIENCE
   ============================================ */

/* --- 1. LIVING SCROLL PATH (SVG Scrollytelling) --- */
.scroll-path-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: visible;
}

.scroll-path-svg {
    position: absolute;
    width: 100%;
    height: 300%;
    top: 0;
    left: 0;
}

.scroll-path {
    fill: none;
    stroke: url(#pathGradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.6)) drop-shadow(0 0 20px rgba(0, 229, 255, 0.4)) drop-shadow(0 0 40px rgba(0, 229, 255, 0.2));
    stroke-dasharray: 8000;
    stroke-dashoffset: 8000;
    transition: stroke-dashoffset 0.05s linear;
}

/* Animated particles along the path */
.path-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #00e5ff 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: particlePulse 2s ease-in-out infinite;
    box-shadow: 0 0 15px 5px rgba(0, 229, 255, 0.5);
}

@keyframes particlePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* Corner snap effect - add sharper lines at section points */
.path-node {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 20px var(--accent-primary),
        0 0 40px rgba(0, 229, 255, 0.3),
        inset 0 0 10px rgba(0, 229, 255, 0.3);
    animation: nodeGlow 2s ease-in-out infinite;
}

@keyframes nodeGlow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--accent-primary), 0 0 40px rgba(0, 229, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 30px var(--accent-primary), 0 0 60px rgba(0, 229, 255, 0.5);
    }
}

/* --- 2. INTERACTIVE BEFORE & AFTER SLIDER (Smartphone Style) --- */
.comparison-section {
    padding: 120px 10%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Smartphone Frame */
.smartphone-frame {
    position: relative;
    width: 320px;
    height: 650px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 45px;
    padding: 12px;
    box-shadow:
        inset 0 0 0 3px #2d3748,
        inset 0 0 0 5px #1a202c,
        0 60px 100px -20px rgba(0, 0, 0, 0.6),
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 229, 255, 0.15);
    margin: 0 auto;
}

/* Phone Notch */
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #0a0a1a;
    border-radius: 0 0 18px 18px;
    z-index: 10;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 229, 255, 0.3);
}

/* Phone Home Indicator */
.phone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.comparison-container {
    position: relative;
    width: 100%;
    height: calc(100% - 20px);
    margin: 0 auto;
    border-radius: 35px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
    background: #000;
    cursor: ew-resize;
}

.comparison-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.comparison-before {
    z-index: 1;
    /* Grayscale filter for "reality" effect */
    filter: saturate(0.3) contrast(0.9);
}

.comparison-after {
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

/* AR Overlay Elements on After Layer */
.ar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ar-arrow {
    position: absolute;
    font-size: 1.8rem;
    color: #00e5ff;
    text-shadow: 0 0 15px #00e5ff, 0 0 30px #00e5ff;
    animation: arFloat 2s ease-in-out infinite;
}

.ar-arrow:nth-child(1) {
    top: 35%;
    left: 20%;
    animation-delay: 0s;
}

.ar-arrow:nth-child(2) {
    top: 40%;
    left: 45%;
    animation-delay: 0.3s;
}

.ar-arrow:nth-child(3) {
    top: 45%;
    left: 70%;
    animation-delay: 0.6s;
}

@keyframes arFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

.ar-info-card {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0, 229, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 229, 255, 0.5);
    border-radius: 10px;
    color: white;
    font-size: 0.7rem;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    animation: cardPulse 3s ease-in-out infinite;
}

.ar-info-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #00e5ff;
    border-radius: 50%;
    animation: dotBlink 1.5s infinite;
}

@keyframes dotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes cardPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(0, 229, 255, 0.5);
    }
}

/* Slider Handle */
.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.6),
        0 5px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}

.comparison-handle:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.comparison-handle i {
    pointer-events: none;
}

/* Labels */
.comparison-labels {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 4;
    pointer-events: none;
}

.comparison-label {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-label.hard {
    border-color: rgba(230, 0, 126, 0.5);
}

.comparison-label.soft {
    border-color: rgba(0, 229, 255, 0.5);
}

/* --- 3. 3D PHONE SHOWCASE --- */
.phone-showcase-section {
    padding: 120px 10%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.phone-showcase-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    max-width: 1400px;
    width: 100%;
}

.phone-showcase-content {
    flex: 1;
    max-width: 500px;
}

.phone-showcase-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.phone-showcase-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* 3D Phone Container */
.phone-3d-container {
    perspective: 2000px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.phone-3d {
    position: relative;
    width: 280px;
    height: 580px;
    transform-style: preserve-3d;
    animation: phoneFloat 6s ease-in-out infinite;
    cursor: grab;
}

.phone-3d:active {
    cursor: grabbing;
}

@keyframes phoneFloat {

    0%,
    100% {
        transform: rotateY(-15deg) rotateX(5deg) translateY(0);
    }

    50% {
        transform: rotateY(-15deg) rotateX(5deg) translateY(-20px);
    }
}

/* Phone Body */
.phone-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 45px;
    box-shadow:
        inset 0 0 0 3px #2d3748,
        inset 0 0 0 4px #1a202c,
        0 60px 100px -20px rgba(0, 0, 0, 0.6),
        0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Caustics Light Effect */
.phone-caustics {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 40% 30% at 30% 20%, rgba(0, 229, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 60%, rgba(230, 0, 126, 0.1) 0%, transparent 50%);
    animation: causticsMove 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
    border-radius: 45px;
}

@keyframes causticsMove {

    0%,
    100% {
        background-position: 0% 0%, 100% 100%;
        opacity: 0.8;
    }

    33% {
        background-position: 50% 30%, 20% 50%;
        opacity: 1;
    }

    66% {
        background-position: 30% 70%, 80% 20%;
        opacity: 0.6;
    }
}

/* Phone Screen */
.phone-screen {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: linear-gradient(180deg, #0a0a1a 0%, #0f0f25 100%);
    border-radius: 35px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Screen Content - App UI */
.phone-ui {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0d1b2a 0%, #1b263b 100%);
    padding: 50px 16px 20px;
    display: flex;
    flex-direction: column;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.phone-app-header {
    text-align: center;
    margin-bottom: 20px;
}

.phone-app-header h4 {
    font-size: 1.2rem;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

.phone-app-header p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* AR View Preview */
.phone-ar-preview {
    flex: 1;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.phone-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
}

/* Ensure AR elements are above the carousel */
.ar-overlay-phone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    /* Above AR overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s;
    pointer-events: auto;
    /* Enable clicks */
}

.carousel-control:hover {
    background: var(--accent-primary);
    border-color: transparent;
    box-shadow: 0 0 10px var(--accent-primary);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}


.phone-ar-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    /* Between image and AR elements */
}

/* AR Path on Phone */
.phone-ar-path {
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg,
            transparent,
            var(--accent-primary) 20%,
            var(--accent-primary) 80%,
            transparent);
    box-shadow: 0 0 20px var(--accent-primary);
    animation: pathGlow 2s ease-in-out infinite;
}

@keyframes pathGlow {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 30px var(--accent-primary);
    }
}

.phone-ar-arrow-mini {
    position: absolute;
    color: var(--accent-primary);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--accent-primary);
    animation: miniArrowFloat 1.5s ease-in-out infinite;
}

.phone-ar-arrow-mini:nth-child(1) {
    top: 30%;
    left: 25%;
}

.phone-ar-arrow-mini:nth-child(2) {
    top: 25%;
    left: 45%;
    animation-delay: 0.2s;
}

.phone-ar-arrow-mini:nth-child(3) {
    top: 35%;
    left: 65%;
    animation-delay: 0.4s;
}

@keyframes miniArrowFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Destination Marker on Phone */
.phone-destination {
    position: absolute;
    bottom: 25%;
    right: 15%;
    width: 30px;
    height: 30px;
    background: var(--accent-secondary);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    animation: destinationPulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent-secondary);
}

@keyframes destinationPulse {

    0%,
    100% {
        transform: rotate(-45deg) scale(1);
    }

    50% {
        transform: rotate(-45deg) scale(1.1);
    }
}

/* Phone Reflection */
.phone-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.05) 100%);
    border-radius: 45px;
    pointer-events: none;
    z-index: 11;
}

/* Screen Indicators */
.phone-screen-indicators {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}

.phone-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.phone-indicator.active {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

/* --- 4. SONAR / FLASHLIGHT MOUSE EFFECT --- */
.sonar-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 51;
    opacity: 0;
    transition: opacity 0.3s;
}

body.sonar-active .sonar-layer {
    opacity: 1;
}

.sonar-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            transparent 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            transparent 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 1) 100%);
}

/* Reveal hidden elements */
.hidden-element {
    opacity: 0;
    transition: opacity 0.3s;
}

body.sonar-active .hidden-element {
    opacity: var(--reveal-opacity, 0);
}

/* Sonar Grid Lines */
.sonar-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 48;
    opacity: 0;
    transition: opacity 0.5s;
    background:
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

body.sonar-active .sonar-grid {
    opacity: 1;
    mask-image: radial-gradient(circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(0, 0, 0, 1) 0%,
            transparent 100%);
    -webkit-mask-image: radial-gradient(circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(0, 0, 0, 1) 0%,
            transparent 100%);
}

/* Sonar Ping Effect */
.sonar-ping {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 52;
    animation: sonarPing 2s ease-out infinite;
    opacity: 0;
}

body.sonar-active .sonar-ping {
    opacity: 1;
}

@keyframes sonarPing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
        border-width: 2px;
    }

    100% {
        transform: translate(-50%, -50%) scale(15);
        opacity: 0;
        border-width: 1px;
    }
}

/* Hidden Navigation Arrows */
.hidden-nav-arrows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 47;
}

.hidden-arrow {
    position: absolute;
    font-size: 2rem;
    color: var(--accent-primary);
    opacity: 0;
    text-shadow: 0 0 20px var(--accent-primary);
    transition: opacity 0.3s;
}

body.sonar-active .hidden-arrow.revealed {
    opacity: 0.6;
}

/* Sonar Toggle Button */
.sonar-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sonar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.6);
}

.sonar-toggle.active {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    animation: togglePulse 2s ease-in-out infinite;
}

@keyframes togglePulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(0, 229, 255, 0.4);
    }

    50% {
        box-shadow: 0 10px 40px rgba(0, 229, 255, 0.8);
    }
}

/* --- 5. DYNAMIC LECTURER SEARCH DEMO --- */
.search-demo-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-demo-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-demo-input {
    width: 100%;
    padding: 20px 60px 20px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.search-demo-input::placeholder {
    color: var(--text-muted);
}

.search-demo-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.3),
        0 0 0 4px rgba(0, 229, 255, 0.1);
}

.search-demo-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 1.3rem;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-top: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-out);
    z-index: 100;
}

.search-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-suggestion-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--glass-border);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: rgba(0, 229, 255, 0.1);
}

.search-suggestion-item.selected {
    background: rgba(0, 229, 255, 0.2);
}

.suggestion-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.suggestion-info h4 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 3px;
}

.suggestion-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Video Background for Search */
.search-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease-out;
    overflow: hidden;
    border-radius: 20px;
}

.search-video-bg.active {
    opacity: 1;
}

.search-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Search Result Overlay */
.search-result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
    border-radius: 20px;
}

.search-result-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-result-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    transform: translateY(30px);
    transition: transform 0.5s var(--ease-out);
}

.search-result-overlay.active .search-result-card {
    transform: translateY(0);
}

.search-result-card i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
    animation: checkPop 0.5s var(--ease-elastic) forwards;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.search-result-card h4 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 5px;
}

.search-result-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Typing indicator bubbles */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 20px;
}

.typing-bubble {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typingBubble 1.4s infinite ease-in-out;
}

.typing-bubble:nth-child(1) {
    animation-delay: 0s;
}

.typing-bubble:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-bubble:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBubble {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    .phone-showcase-wrapper {
        flex-direction: column;
        gap: 50px;
    }

    .phone-3d-container {
        min-height: 500px;
    }

    .phone-3d {
        width: 240px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .comparison-handle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .phone-3d {
        width: 200px;
        height: 420px;
    }

    .phone-body {
        border-radius: 35px;
    }

    .phone-screen {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 28px;
    }

    .sonar-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}