/* ========================================
   SCREENSHOT CAROUSEL STYLES - PIXEL 9A STYLE
   ======================================== */

:root {
    --pixel-frame: #141414;
    --pixel-metal: linear-gradient(145deg, #1f1f1f, #2c2c2c);
    --pixel-glow: rgba(0, 0, 0, 0.35);
    --pixel-padding: clamp(16px, 2.5vw, 22px);
    --pixel-notch-offset: clamp(28px, 3vw, 36px);
    --pixel-notch-size: clamp(18px, 2.4vw, 24px);
    --pixel-notch-border: clamp(3px, 0.45vw, 4px);
}

/* Modern Google Pixel 9A Frame */
.phone-frame {
    position: relative;
    width: min(340px, 80vw);
    aspect-ratio: 9 / 19.5;
    margin: 0 auto;
    padding: var(--pixel-padding);
    border-radius: 42px;
    background: var(--pixel-metal);
    box-shadow:
        0 30px 70px var(--pixel-glow),
        0 0 0 10px rgba(0, 0, 0, 0.65),
        0 0 1px 11px rgba(255, 255, 255, 0.08),
        inset 0 0 2px rgba(255, 255, 255, 0.15);
    overflow: visible;
    transform: translateZ(0);
}

.phone-frame::before,
.phone-frame::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-radius: 40px;
}

.phone-frame::before {
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0.7;
}

.phone-frame::after {
    inset: 10px;
    border-radius: 32px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.12), transparent 55%);
    opacity: 0.2;
}

/* Phone screen */
.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
}

.phone-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    pointer-events: none;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.35);
}

.phone-notch {
    position: absolute;
    top: var(--pixel-notch-offset);
    left: 50%;
    transform: translateX(-50%);
    width: var(--pixel-notch-size);
    height: var(--pixel-notch-size);
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(80, 80, 80, 0.35), #030303 70%);
    border: var(--pixel-notch-border) solid var(--pixel-frame);
    z-index: 5;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

/* Phone home indicator */
.phone-home-indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 5;
}

/* Screenshots Section */
.screenshots-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: radial-gradient(circle at top, rgba(98,0,234,0.07), transparent 55%), var(--surface);
}

.screenshots-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 0;
    margin: 0 calc(-1 * var(--spacing-md));
    scroll-padding: 0 var(--spacing-md);
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    gap: clamp(1rem, 4vw, 2.25rem);
}

.screenshots-scroller:active {
    cursor: grabbing;
}

.screenshots-scroller::-webkit-scrollbar {
    display: none;
}

.screenshot-card {
    flex: 0 0 auto;
    width: min(360px, 82vw);
    scroll-snap-align: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.85;
}

.screenshot-card:hover {
    transform: translateY(-6px);
    opacity: 1;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 28px;
    user-select: none;
    -webkit-user-drag: none;
    background: #000;
}

.screenshot-caption {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

/* Navigation Dots */
.screenshots-dots {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    gap: 0.75rem;
}

.screenshot-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.screenshot-dot.active {
    background: #1a73e8; /* Google blue */
    transform: scale(1.3);
    width: 24px;
    border-radius: 6px;
}

/* Modal Styles */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.screenshot-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.screenshot-modal.active .modal-content {
    transform: scale(1);
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    cursor: zoom-out;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    border: none;
    padding: 0;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .screenshot-card {
        width: 320px;
        margin: 0 1.25rem;
    }
}

@media (max-width: 768px) {
    .phone-frame {
        width: 280px;
        height: 580px;
        border-radius: 36px;
    }
    
    .screenshot-card {
        width: 300px;
        margin: 0 1rem;
    }
    
    .screenshots-section {
        padding: 3rem 0;
    }
}

@media (max-width: 576px) {
    .phone-frame {
        width: 260px;
        height: 540px;
        border-radius: 32px;
    }
    
    .screenshot-card {
        width: 280px;
    }
    
    .screenshots-scroller {
        padding: 1.5rem 0;
        margin: 0 -0.5rem;
    }
    
    .screenshot-card {
        margin: 0 0.75rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] {
    .screenshot-card img {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .screenshot-card:hover img {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    }
    
    .screenshot-dot {
        background: #444;
    }
    
    .phone-frame {
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5),
                    0 0 0 12px #0a0a0a,
                    0 0 0 14px #444,
                    0 0 0 16px #0a0a0a;
    }
    
    .screenshot-caption {
        color: var(--text-secondary);
    }
}

/* Animation for smooth transitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.screenshot-modal {
    animation: fadeIn 0.3s ease-out;
}

/* Improve scrollbar appearance (for browsers that support it) */
.screenshots-scroller {
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
}

.screenshots-scroller::-webkit-scrollbar {
    height: 6px;
}

.screenshots-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.screenshots-scroller::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 3px;
}

/* Add hover effect for desktop */
@media (hover: hover) {
    .screenshot-dot:hover {
        background: #1a73e8;
        opacity: 0.8;
    }
}
