/* Custom CSS for Glassmorphism and animations */
html {
    scroll-behavior: smooth;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
}

/* ===== MOBILE PERFORMANCE & SCROLL FIX ===== */
@media (max-width: 768px) {

    /* Scrollbar hide */
    ::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }
    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    /* Only block horizontal overflow — never block vertical (kills scroll) */
    body {
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: none;
    }

    /* DISABLE heavy backdrop-blur on mobile */
    .glass-header,
    .glass-panel,
    .glass-surface,
    .glass-card,
    .glass-input,
    .glass-pill {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .glass-header {
        background: rgba(15, 23, 42, 0.97) !important;
    }

    .glass-card:hover {
        transform: none !important;
    }

    .overflow-x-auto {
        -webkit-overflow-scrolling: touch !important;
    }

    .animate-blob {
        animation-duration: 14s !important;
    }

    /* Mobile menu full height only on mobile */
    #mobile-menu {
        height: calc(100vh - 5rem);
        overflow-y: auto;
    }
}

/* Tablet also gets scrollbar hidden */
@media (min-width: 769px) and (max-width: 1024px) {
    ::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
}

/* Global section overflow fix */
section {
    overflow-x: hidden;
    max-width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
    /* slate-900 */
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Utilities */
.glass-header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-panel {
    background: rgba(30, 41, 59, 0.5);
    /* slate-800 with opacity */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#mobile-menu {
    background: rgba(15, 23, 42, 0.95);
    /* slate-900 high opacity */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.15);
    /* Soft purple glow */
}

/* Specific for inner elements without hover effects */
.glass-surface {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.5);
    /* purple-500 */
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.glass-button-primary {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(236, 72, 153, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    transition: all 0.3s ease;
}

.glass-button-primary:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 1), rgba(236, 72, 153, 1));
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.glass-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.glass-pill:hover,
.glass-pill.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.glass-pill.active {
    background: rgba(168, 85, 247, 0.3);
    /* Purple tint */
    border-color: rgba(168, 85, 247, 0.5);
    color: white;
}

/* Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Page Transitions */
.page-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Toast Animation */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.toast-enter {
    animation: slideInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-exit {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Image Hover Zoom */
.img-zoom-wrapper {
    overflow: hidden;
}

.img-zoom {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.glass-card:hover .img-zoom {
    transform: scale(1.08);
    /* slight zoom on card hover */
}

/* ===== Testimonials Marquee Auto-Scroll ===== */
@keyframes testimonial-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

#testimonials-container:hover {
    animation-play-state: paused;
}

.prompt-copy-block {
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ===== Skeleton Loading ===== */
@keyframes skeleton-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.10) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.6s infinite linear;
    border-radius: 8px;
}

.skeleton-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
}

.skeleton-img {
    height: 200px;
    width: 100%;
}

.skeleton-title {
    height: 18px;
    width: 75%;
    margin-bottom: 10px;
}

.skeleton-line {
    height: 13px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-line-short {
    height: 13px;
    width: 55%;
}

.skeleton-badge {
    height: 22px;
    width: 80px;
    border-radius: 20px;
}

.skeleton-avatar {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-btn {
    height: 40px;
    border-radius: 12px;
}