/* 
   Premium Glassmorphism Design System 
   Optimized for Visual Depth, Clarity, and Performance
*/

:root {
    --glass-bg: rgba(20, 10, 5, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 160, 0, 0.3);
    --glass-blur: 20px;
    --glass-saturate: 180%;
    --glass-shine: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* 1. Ultra-Glassy Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 160, 0, 0.2);
}

/* 2. Glassy Selection */
::selection {
    background: rgba(255, 160, 0, 0.3);
    color: white;
    text-shadow: 0 0 10px rgba(255, 160, 0, 0.5);
}

/* Base Glass Utility */
.glass-card,
.os-badge,
.info-section-card,
.faq-item,
.status-badge,
.copy-toast {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow:
        0 10px 30px -5px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    /* Force GPU rendering for sharp text */
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.01) !important;
    /* Removed redundant blur to prevent text blurring on child elements */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 40px !important;
    padding: 40px !important;
    position: relative;
    z-index: 1;
}

/* Ensure text inside glass is always sharp */
.glass-card *,
.glass-panel *,
.info-section-card *,
.faq-item * {
    position: relative;
    z-index: 2;
    -webkit-font-smoothing: subpixel-antialiased !important;
    -moz-osx-font-smoothing: auto !important;
    text-rendering: optimizeLegibility !important;
}

/* Mobile-Specific Clarity Fixes */
@media (max-width: 768px) {
    :root {
        --glass-blur: 12px;
        /* Reduced blur for mobile to prevent text bleeding */
    }

    .glass-panel {
        padding: 24px !important;
        border-radius: 24px !important;
    }

    .info-section-card {
        padding: 20px !important;
    }
}

/* Hover Enhancements */
.glass-card:hover,
.os-badge:hover,
.info-section-card:hover {
    background: rgba(30, 15, 5, 0.6) !important;
    border-color: var(--glass-border-hover) !important;
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow:
        0 20px 40px -10px rgba(255, 120, 0, 0.15),
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
}

/* Sticky Navigation Glass */
.sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    background: rgba(10, 5, 2, 0.8) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

/* iOS-style Soft Glass Buttons */
.ios-button,
.nav-contact-btn,
.order-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    transition: all 0.3s ease !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-button:hover,
.nav-contact-btn:hover,
.order-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 160, 0, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.order-btn {
    width: 100%;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Refined FAQ Glass */
.faq-item {
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.faq-question {
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    padding: 18px 24px !important;
}

.faq-answer {
    color: #e0e0e0 !important;
    /* Higher contrast for better readability */
    font-weight: 500;
    padding: 0 24px 20px 24px !important;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Specific FAQ Sharpness for Mobile */
@media (max-width: 768px) {
    .faq-question {
        font-size: 15px !important;
        padding: 16px 20px !important;
    }

    .faq-answer {
        font-size: 13px !important;
        line-height: 1.5;
        color: #f0f0f0 !important;
    }
}

/* Premium Web3 Void Elements */
.web3-void {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.void-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: void-drift 20s infinite alternate ease-in-out;
    mix-blend-mode: screen;
}

@keyframes void-drift {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(100px, 100px) scale(1.2) rotate(15deg);
    }
}

/* 4. Glossy Shine Overlay */
.glass-shimmer {
    position: relative;
    overflow: hidden;
}

.glass-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transform: rotate(45deg);
    animation: shimmer-flow 6s infinite linear;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmer-flow {
    0% {
        transform: rotate(45deg) translateY(0);
    }

    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

/* 3D Perspective Configuration */
.perspective-container {
    perspective: 2000px;
    width: 100%;
}

.glass-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: rgba(25, 12, 5, 0.4) !important;
    /* GPU acceleration for sharp text on mobile */
    transform: translateZ(0);
}

.glass-card:hover {
    transform: translateY(-15px) rotateX(4deg) rotateY(-2deg) scale(1.03) !important;
    box-shadow:
        -10px 20px 50px -10px rgba(255, 120, 0, 0.2),
        0 0 30px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15) !important;
}

/* Cybernetic Animated Border */
.popular-card {
    border-color: rgba(255, 140, 0, 0.4) !important;
    position: relative;
}

.popular-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 140, 0, 0.3), transparent);
    border-radius: inherit;
    z-index: -1;
    animation: border-flow 4s linear infinite;
}

@keyframes border-flow {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

/* Depth Animations */
@keyframes float-around {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(2vw, 2vh) rotate(1deg);
    }

    66% {
        transform: translate(-1vw, 3vh) rotate(-1deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.fade-in {
    animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

/* Error Pages Styling */
.error-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    position: relative;
    z-index: 10;
}

.error-code {
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 160, 0, 0.6));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 160, 0, 0.3));
    animation: pulse-glow 4s infinite alternate ease-in-out;
}

.error-icon {
    font-size: 3.5rem;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.15);
}

@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 20px rgba(255, 160, 0, 0.15));
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 60px rgba(255, 160, 0, 0.5));
        transform: scale(1.05);
    }
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.error-message {
    color: #aaaaaa;
    max-width: 500px;
    margin-bottom: 40px;
    line-height: 1.6;
}