/* Additional custom styles that complement Tailwind */

/* Custom selection color */
::selection {
    background: rgba(204, 18, 200, 0.3);
    color: white;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1A2128;
}

::-webkit-scrollbar-thumb {
    background: #CC12C8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e015dc;
}

/* Ensure smooth font rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus visible styles for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #CC12C8;
    outline-offset: 2px;
}

/* Android-specific optimizations */
@supports (-webkit-touch-callout: none) {

    /* CSS specific to iOS devices */
    .glass {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Prevent text selection on UI elements */
button,
nav {
    user-select: none;
    -webkit-user-select: none;
}

/* Animation for mobile menu (if needed later) */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Loading state for buttons */
button.loading {
    pointer-events: none;
    opacity: 0.7;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass {
        border: 2px solid white;
    }

    .text-gray-400 {
        color: #ccc;
    }
}

/* Print styles (hide unnecessary elements) */
@media print {

    .noise,
    .floating,
    nav,
    button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

* {
    scroll-behavior: smooth;
}

body {
    background-color: #242D35;
    color: white;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #CC12C8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(47, 58, 68, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(26, 33, 40, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(204, 18, 200, 0.2);
}

.features-grid {
    display: grid;
    /* This ensures it never overflows the screen width */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem; /* Slightly tighter gap looks better on mobile */
    padding: 1rem;
}

.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #CC12C8, transparent, #CC12C8);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-border:hover::before {
    opacity: 1;
}

.feature-icon {
    background: linear-gradient(135deg, rgba(204, 18, 200, 0.2), rgba(204, 18, 200, 0.05));
    border: 1px solid rgba(204, 18, 200, 0.3);
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(204, 18, 200, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(204, 18, 200, 0.6);
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #CC12C8;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: #CC12C8
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* ── Screenshots Carousel ── */
.screenshots-section {
    background: linear-gradient(180deg, transparent 0%, rgba(26, 33, 40, 0.5) 50%, transparent 100%);
}

.screenshots-outer {
    width: 100%;
    overflow: hidden;
    padding: 32px 0 24px;
    cursor: grab;
    user-select: none;
}

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

.screenshots-track {
    display: flex;
    gap: 28px;
    width: max-content;
    padding: 16px 60px;
    will-change: transform;
}

/* Phone card */
.screenshot-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(.22, .68, 0, 1.3);
}

.screenshot-card:hover {
    transform: translateY(-10px) scale(1.03);
}

.screenshot-frame {
    position: relative;
    width: 200px;
    height: 400px;
    border-radius: 32px;
    overflow: hidden;
    border: 2px solid rgba(204, 18, 200, 0.35);
    background: #1A2128;
    box-shadow:
        0 0 0 6px rgba(47, 58, 68, 0.7),
        0 0 40px rgba(204, 18, 200, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.4s ease;
}

.screenshot-card:hover .screenshot-frame {
    box-shadow:
        0 0 0 6px rgba(47, 58, 68, 0.7),
        0 0 60px rgba(204, 18, 200, 0.45),
        0 40px 80px rgba(0, 0, 0, 0.6);
    border-color: rgba(204, 18, 200, 0.7);
}

.phone-notch {
    /* position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 8px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 999px;
    z-index: 10; */
}

.screenshot-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 30px;
}

/* Label below phone */
.screenshot-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    background: rgba(47, 58, 68, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 999px;
    transition: color 0.3s, border-color 0.3s;
}

.screenshot-card:hover .screenshot-label {
    color: #CC12C8;
    border-color: rgba(204, 18, 200, 0.4);
}

/* Fade overlays */
.screenshots-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 140px;
    z-index: 5;
}

.screenshots-fade-left {
    left: 0;
    background: linear-gradient(to right, #242D35 0%, transparent 100%);
}

.screenshots-fade-right {
    right: 0;
    background: linear-gradient(to left, #242D35 0%, transparent 100%);
}

/* Dot indicators */
.screenshots-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: width 0.35s ease, background 0.35s ease;
    padding: 0;
}

.dot.active {
    width: 28px;
    background: #CC12C8;
}

/* Nav arrows */
.screenshots-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.nav-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(204, 18, 200, 0.35);
    background: rgba(47, 58, 68, 0.5);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.nav-arrow:hover {
    background: rgba(204, 18, 200, 0.2);
    border-color: #CC12C8;
    box-shadow: 0 0 20px rgba(204, 18, 200, 0.3);
    transform: scale(1.1);
}