@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Source_Code_Pro:wght@400;600&display=swap');

:root {
    --bg-deep: #020617;
    --glass-panel: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(148, 163, 184, 0.1);
    --neon-blue: #38bdf8;
    --neon-purple: #c084fc;
    --neon-pink: #f472b6;
}

/* ==========================================================================
   GLOBAL THEME: ELOQUENT BLACK GLASS HYBRID
   ========================================================================== */

/* Apply this class to BODY for consistent background */
.adtarah-theme {
    font-family: 'Inter', sans-serif !important;
    background-color: #030303 !important;
    color: #ffffff !important;
    /* Multi-layered deep space gradient */
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.07) 0%, transparent 70%),
        linear-gradient(160deg, #0a0a0a 0%, #000000 100%) !important;
    min-height: 100vh;
    /* Default to fixed on desktop */
    background-attachment: fixed !important;
}

.font-mono {
    font-family: 'Source Code Pro', monospace;
}

/* ==========================================================================
   GLASS CARD COMPONENT
   ========================================================================== */
.glass-card {
    /* Hybrid: Dark glossy surface with a diagonal sheen */
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%),
        rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);

    /* Complex Border Geometry */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);

    border-radius: 16px;

    /* Levitation & Inner Glow */
    box-shadow:
        0 20px 40px -8px rgba(0, 0, 0, 0.8),
        0 0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.05) inset;

    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-4px) scale(1.005);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.4) 100%),
        rgba(20, 20, 25, 0.7);

    border-top-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 1),
        0 0 25px rgba(255, 255, 255, 0.03);
}

.glass-card:hover::before {
    left: 150%;
    transition: 1s;
}

/* ==========================================================================
   INPUTS & BUTTONS
   ========================================================================== */
input,
textarea,
select {
    background: #050505 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: #000000 !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 0.05) !important;
}

/* ==========================================================================
   MOBILE LAYOUT LOCK & NAVIGATION (The Fix)
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. LOCK THE BODY */
    html,
    body.adtarah-theme,
    body {
        height: 100dvh !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        background-attachment: scroll !important;
        /* Mobile Perf */
    }

    /* 2. ABSOLUTE MAIN CONTAINER */
    /* Add class="locked-main" to <main> to enable this */
    main,
    .locked-main {
        position: absolute !important;
        top: 56px !important;
        /* Below Header */
        bottom: calc(64px + env(safe-area-inset-bottom)) !important;
        /* Above Footer */
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        overflow: hidden !important;
    }

    /* 3. SCROLLABLE INNER CONTAINER */
    /* Child div must have id="main-scroll" or class="scroll-container" */
    #main-scroll,
    .scroll-container {
        height: 100%;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* 4. PREMIUM BOTTOM NAV */
    .mobile-bottom-nav {
        display: flex !important;
        /* Ensure visible on mobile */
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        padding-bottom: env(safe-area-inset-bottom);

        background:
            linear-gradient(180deg, rgba(20, 20, 25, 0.85) 0%, rgba(5, 5, 5, 0.95) 100%),
            rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(24px) saturate(120%) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        position: relative;
        color: #94a3b8;
        /* Slate 400 */
        transition: all 0.3s ease;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav button.active {
        color: #ffffff;
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    }

    .mobile-bottom-nav a.active::after,
    .mobile-bottom-nav button.active::after {
        content: '';
        position: absolute;
        top: 5px;
        right: 35%;
        width: 4px;
        height: 4px;
        background: #38bdf8;
        border-radius: 50%;
        box-shadow: 0 0 8px #38bdf8;
    }
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* ==========================================================================
   ANIMATION
   ========================================================================== */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform: translateY(20px);
    opacity: 0;
}

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