:root {
    --bg-primary: #06060f;
    --bg-secondary: #0a0a18;
    --bg-dark: #06060f;
    --bg-card: rgba(14, 14, 28, 0.65);
    --border-color: rgba(138, 43, 226, 0.15);
    --text-main: #e8eaf6;
    --text-muted: #7986a3;
    --accent-primary: #8a2be2;
    --accent-secondary: #00d2ff;
    --accent-glow: rgba(138, 43, 226, 0.4);
    --cyan-glow: rgba(0, 210, 255, 0.3);
    --gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --nav-bg: rgba(6, 6, 15, 0.88);
    
    /* Services Variables */
    --service-bg: #06060f;
    --service-card-bg: rgba(12, 12, 24, 0.7);
    --service-card-hover: rgba(20, 20, 40, 0.85);
    --service-card-border: rgba(138, 43, 226, 0.12);
    --service-img-bg: rgba(255,255,255,0.02);
    --service-title: #e8eaf6;
    --search-bg: rgba(6, 6, 15, 0.6);
}

[data-theme="light"] {
    --bg-dark: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-main: #111111;
    --text-muted: #333344;
    --accent-primary: #7b2cbf;
    --accent-secondary: #0096c7;
    --gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --nav-bg: rgba(255, 255, 255, 0.95);
    
    /* Services Variables */
    --service-bg: #ebeeef;
    --service-card-bg: rgba(255, 255, 255, 0.9);
    --service-card-hover: rgba(255, 255, 255, 1);
    --service-card-border: rgba(0,0,0,0.08);
    --service-img-bg: rgba(0,0,0,0.04);
    --service-title: #111;
    --search-bg: rgba(255,255,255,0.8);
    --nav-text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 5px rgba(255, 255, 255, 0.7);
}

[data-theme="light"] body {
    background-color: #f4f6f9;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(138, 43, 226, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(0, 210, 255, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(200, 205, 215, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 205, 215, 0.4) 1px, transparent 1px);
    background-size: 100vw 100vh, 100vw 100vh, 35px 35px, 35px 35px;
    background-attachment: fixed;
    background-position: center center;
}

[data-theme="light"] .hero-bg {
    opacity: 0.08;
}

[data-theme="light"] .hero-overlay {
    background: linear-gradient(to bottom, rgba(240, 242, 245, 0.4) 0%, rgba(240, 242, 245, 0.95) 100%);
}

[data-theme="light"] .badge {
    background: rgba(123, 44, 191, 0.15);
    border: 1px solid rgba(123, 44, 191, 0.3);
    color: #7b2cbf;
}

[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

[data-theme="light"] .modal-content h3 { color: #111; }
[data-theme="light"] .modal-content p { color: #555; }
[data-theme="light"] .close-modal { color: #666; }
[data-theme="light"] .close-modal:hover { color: #000; }

[data-theme="light"] .auth-tab { color: #666; }
[data-theme="light"] .auth-tab:hover:not(.active) { color: #111; }
[data-theme="light"] .auth-tab.active { color: #111; background: rgba(0, 0, 0, 0.05); }

[data-theme="light"] .form-group label { color: #444; }

[data-theme="light"] .form-group input, 
[data-theme="light"] .auth-input {
    background: #f9f9fb;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #111;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

[data-theme="light"] .form-group input:focus, 
[data-theme="light"] .auth-input:focus {
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.15);
}

[data-theme="light"] .form-group input::placeholder, 
[data-theme="light"] .auth-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .toggle-pw,
[data-theme="light"] .show-pw-toggle {
    color: #666;
}




[data-theme="light"] .card-price {
    color: #0077cc !important;
}

[data-theme="light"] .card-time {
    background: rgba(255, 140, 0, 0.1) !important;
    color: #e67300 !important;
    border-color: rgba(255, 140, 0, 0.2) !important;
}

/* 🛡️ AXIOM HIGH-VOLTAGE ERROR PULSE — Senior-Level UX Feedback */
@keyframes nexusShake {
    0%, 100% { transform: translateX(-50%); }
    20%, 40%, 60%, 80% { transform: translateX(-52%); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-48%); }
}

/* 🛡️ SUCCESS PULSE — Cyan-Neon Glow */
.nexus-toast.success {
    border-color: rgba(0, 230, 255, 0.5);
    background: rgba(14, 21, 28, 0.95);
    animation: toastSlideIn 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 40px -10px rgba(0, 230, 255, 0.3), 0 0 15px rgba(0, 230, 255, 0.1);
}

.nexus-toast.success span:first-child {
    filter: drop-shadow(0 0 5px #00e6ff);
    color: #00e6ff;
}

@keyframes nexusGlowPulse {
    0%, 100% { box-shadow: 0 10px 40px -10px rgba(255, 74, 74, 0.5), 0 0 10px rgba(255, 74, 74, 0.2); border-color: rgba(255, 74, 74, 0.4); }
    50% { box-shadow: 0 15px 50px -10px rgba(255, 74, 74, 0.8), 0 0 25px rgba(255, 74, 74, 0.5); border-color: rgba(255, 74, 74, 0.8); }
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translate(-50%, -40px) scale(0.9); filter: blur(20px); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); filter: blur(0); }
}

.nexus-toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 14, 28, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 74, 74, 0.5);
    color: #fff;
    padding: 18px 32px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 800;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 16px;
    letter-spacing: -0.4px;
    animation: toastSlideIn 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
               nexusShake 0.4s ease-in-out, 
               nexusGlowPulse 2s infinite ease-in-out;
    pointer-events: none;
    text-transform: capitalize;
}

.nexus-toast span:first-child {
    font-size: 22px;
    filter: drop-shadow(0 0 5px #ff4a4a);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #020202;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
        url('assets/premium_bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Removed ambient neon orbs for AMOLED luxury aesthetic */

h1, h2, h3, h4, .logo {
    font-family: 'Space Grotesk', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(5, 5, 5, 0.65);
    background-image: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}



.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    padding: 1rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .accent {
    color: var(--accent-secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    opacity: 1;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    text-shadow: var(--nav-text-shadow, none);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-login {
    font-weight: 600;
}

.btn-register, .btn-primary, .btn-secondary, .btn-buy {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-register {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
}

.btn-register:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.05);
    animation: pulse 20s infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(6, 6, 15, 0.2) 0%, rgba(6, 6, 15, 0.95) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: #e0b0ff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient);
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    box-shadow: 0 4px 15px var(--accent-glow);
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px var(--accent-glow);
    transform: translateY(-3px);
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 1rem 2.5rem;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-secondary);
    transform: translateY(-3px);
}

/* General Layouts */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-alt {
    background: rgba(138, 43, 226, 0.04);
    border-top: 1px solid rgba(138, 43, 226, 0.12);
    border-bottom: 1px solid rgba(138, 43, 226, 0.12);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--accent-secondary);
    font-weight: 600;
    display: inline-block;
}

.card-link:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

/* Products Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: rgba(10, 10, 22, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 20px 50px rgba(138, 43, 226, 0.2), 0 0 0 1px rgba(138, 43, 226, 0.15);
}

.product-card:hover::before {
    opacity: 1;
}

.product-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #bbb;
}

.product-tag.highlight {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.product-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.price {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: white;
    margin-bottom: 1rem;
}

.product-card .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    min-height: 60px;
}

.btn-buy {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: white;
    padding: 1rem;
}

.product-card:hover .btn-buy {
    background: var(--gradient);
    border-color: transparent;
}

/* Footer */
footer {
    background: rgba(4, 4, 12, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(138, 43, 226, 0.15);
    padding: 5rem 2rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.brand-col p {
    color: var(--text-muted);
    margin: 1.5rem 0;
    max-width: 300px;
}

.socials a {
    display: inline-block;
    margin-right: 1rem;
    color: var(--text-muted);
}

.socials a:hover {
    color: var(--accent-secondary);
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations Tools */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Responsive */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

/* Hamburger Animations */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Light Mode Burger override */
[data-theme="light"] .hamburger span {
    background: var(--text-color);
}

@media (max-width: 900px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Hidden state */
        transition: clip-path 0.4s ease-in-out;
    }

    [data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* Revealed state */
    }

    .nav-auth {
        display: none; /* Move auth buttons inside nav-links for mobile, or keep hidden if handled separately */
    }

    .hamburger {
        display: flex;
        z-index: 100;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Notification Bell System */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.4rem;
    margin-right: 1.5rem;
    color: var(--text-muted);
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.notification-bell:hover { color: white; }

.notif-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
}

.notif-dropdown {
    position: absolute;
    top: 250%;
    right: -10px;
    width: 320px;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
}

.notif-dropdown.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.notif-header {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
    color: white;
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.notif-item {
    font-size: 0.9rem;
    padding: 0.8rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-secondary);
}
.notif-item h5 { margin-bottom: 0.2rem; font-size: 0.95rem; }
.notif-item.success { border-left-color: #6bcb77; }
.notif-item.error { border-left-color: #ff6b6b; }
.notif-item.info { border-left-color: #4facfe; }

/* ==========================================
   LANDING PAGE OVERHAUL STYLES
========================================== */

/* Live Marquee Ticker */
.live-ticker {
    background: rgba(10, 10, 15, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.8rem 0;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    z-index: 10;
}

.ticker-track {
    display: inline-block;
    animation: marquee 25s linear infinite;
}

.ticker-track span {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 2rem;
    font-weight: 500;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Data Counters */
.stats-section {
    padding: 3rem 5%;
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-box {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.1);
}

.stat-num {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, white, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Intersection Observer Animations */
.fetch-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fetch-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal / Auth Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(20, 20, 30, 0.85);
    border-radius: 20px;
    padding: 3rem;
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: white;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.auth-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.auth-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab:hover:not(.active) {
    color: white;
}

@keyframes slideFadeIn {
    0% { opacity: 0; transform: translateX(20px); filter: blur(4px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: slideFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-form h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-form p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #bbb;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input, .auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    background: #0f0f11;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.form-group input:focus, .auth-input:focus {
    outline: none;
    border-color: #ffffff;
    background: #151518;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), inset 0 2px 8px rgba(0,0,0,0.8);
    transform: translateY(-2px);
}

.form-group input::placeholder, .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember input {
    margin-right: 8px;
    accent-color: var(--accent-primary);
}

.forgot {
    color: var(--accent-secondary);
}

.forgot:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.full-width {
    width: 100%;
    font-size: 1.1rem;
    padding: 1.2rem;
}

.pin-input {
    letter-spacing: 0.8em;
    font-size: 1.5rem !important;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Service Details Page */
.service-page-header {
    position: relative;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
}
.detailed-service {
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    transition: transform 0.3s;
}
.detailed-service:hover {
    transform: translateY(-5px);
    border-color: rgba(138, 43, 226, 0.4);
}
.detail-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}
.detailed-service h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.detailed-service p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
    margin-bottom: 2rem;
}
.feature-list {
    list-style: none;
}
.feature-list li {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 500;
}
.feature-list li:last-child {
    border-bottom: none;
}
.feature-price {
    color: var(--accent-secondary);
    font-family: 'Space Grotesk', sans-serif;
}

/* Rental Grid for Tools */
.rental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.rental-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.rental-card:hover {
    transform: translateY(-5px);
    border-color: rgba(138, 43, 226, 0.4);
    background: rgba(30, 30, 45, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.rental-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.rental-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.rental-time {
    font-size: 0.8rem;
    color: var(--accent-secondary);
    background: rgba(0, 255, 204, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}
.rental-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 600;
    flex-grow: 1;
}
.rental-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1rem;
}
.rental-price {
    font-family: 'Space Grotesk', sans-serif;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}
.btn-rent-small {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.3s;
    font-weight: 600;
    font-family: 'Inter', 'Outfit', sans-serif;
}
.btn-rent-small:hover {
    opacity: 0.9;
}

/* ============================================
   DASHBOARD & ADMIN PANEL STYLES
   ============================================ */
.dash-wrapper {
    max-width: 1400px;
    margin: 0;
    padding: 120px 2rem 4rem;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.dash-header h1 {
    font-size: 2.4rem;
}
.dash-subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.dash-badge {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.2);
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}
.admin-glow {
    background: rgba(138, 43, 226, 0.1);
    border-color: rgba(138, 43, 226, 0.3);
    color: #c084fc;
    animation: adminPulse 2s ease-in-out infinite;
}
@keyframes adminPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(138, 43, 226, 0.1); }
    50% { box-shadow: 0 0 25px rgba(138, 43, 226, 0.3); }
}
.admin-badge-nav {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: rgba(138, 43, 226, 0.15);
    color: #c084fc;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Stats Cards */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.stat-card {
    padding: 2rem;
    border-radius: 20px;
    transition: transform 0.3s;
}
.stat-card:hover {
    transform: translateY(-4px);
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.stat-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.balance-card {
    border: 1px solid rgba(0, 255, 204, 0.2) !important;
}
.balance-card .stat-value {
    color: var(--accent-secondary);
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}
.admin-stat {
    border: 1px solid rgba(138, 43, 226, 0.2) !important;
}

/* Dashboard Sections */
.dash-section {
    margin-bottom: 3rem;
}
.dash-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.quick-action {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: white;
    transition: transform 0.3s, border-color 0.3s;
}
.quick-action:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 43, 226, 0.4);
}
.qa-icon {
    font-size: 2rem;
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qa-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
.qa-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Activity List */
.activity-list {
    padding: 1.5rem;
    border-radius: 16px;
}
.activity-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}
.activity-empty a {
    color: var(--accent-secondary);
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-icon {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.activity-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.activity-desc {
    font-size: 0.95rem;
}
.activity-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.activity-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}
.activity-amount.positive {
    color: var(--accent-secondary);
}
.activity-amount.negative {
    color: #ff6b6b;
}

/* Admin Credit Box */
.admin-credit-box {
    padding: 2rem;
    border-radius: 20px;
}
.credit-form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.admin-success {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(0, 255, 130, 0.08);
    border: 1px solid rgba(0, 255, 130, 0.2);
    color: #4ade80;
    text-align: center;
    font-weight: 600;
    animation: fadeInUp 0.4s ease;
}

/* Active nav link */
.active-link {
    color: var(--accent-secondary) !important;
}

@media (max-width: 768px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .credit-form-row {
        flex-direction: column;
        gap: 0;
    }
    .dash-header h1 {
        font-size: 1.8rem;
    }
}

/* Floating Balance Bar */
.floating-balance {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(15, 15, 25, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    align-items: center;
    gap: 0.8rem;
    z-index: 1500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    animation: floatIn 0.5s ease forwards;
}
.fb-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--accent-secondary);
    font-size: 1.1rem;
}
@keyframes floatIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Purchase History Table */
.purchase-history {
    padding: 1.5rem;
    border-radius: 16px;
    overflow-x: auto;
}
.ph-table-header {
    display: flex;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.ph-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    align-items: center;
    transition: background 0.2s;
}
.ph-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.ph-row:last-child {
    border-bottom: none;
}
.ph-col {
    font-size: 0.95rem;
}
.item-col {
    flex: 2;
    min-width: 180px;
}
.amount-col {
    flex: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    min-width: 100px;
}
.status-col {
    flex: 0.8;
    min-width: 100px;
}
.date-col {
    flex: 1.2;
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 140px;
}
.ph-item-name {
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.status-success {
    background: rgba(0, 255, 130, 0.1);
    border: 1px solid rgba(0, 255, 130, 0.25);
    color: #4ade80;
}
.status-pending {
    background: rgba(255, 200, 0, 0.1);
    border: 1px solid rgba(255, 200, 0, 0.25);
    color: #fbbf24;
}
.status-failed {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.25);
    color: #ff6b6b;
}

/* Profile Dropdown Menu */
.profile-dropdown {
    position: relative;
    display: inline-block;
}
.profile-trigger {
    background: transparent;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding: 0.4rem 0.6rem;
    border-radius: 30px;
    transition: background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}
.profile-avatar {
    background: var(--gradient);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.profile-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.profile-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.profile-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 240px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}
.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pm-header {
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px 16px 0 0;
}
.pm-email {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-balance {
    display: block;
    font-weight: 700;
    color: var(--accent-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
}
.pm-item {
    display: block;
    padding: 0.9rem 1.2rem;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.pm-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-secondary);
}
.pm-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
}
.pm-logout {
    color: #ff6b6b;
    border-radius: 0 0 16px 16px;
}
.pm-logout:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* Order History Extensions */
.id-col { flex: 0.8; font-weight: 600; color: white; min-width: 80px; }
.type-col { flex: 0.8; min-width: 80px; }
.view-col { flex: 0.5; min-width: 60px; text-align: right; }
.btn-view { background: transparent; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); transition: color 0.2s; }
.btn-view:hover { color: var(--accent-secondary); }

/* Deep Blue Modal for Orders */
.deep-blue-modal {
    background: linear-gradient(145deg, #0f172a, #1e293b) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 20px rgba(56, 189, 248, 0.1) !important;
}
.modal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px 16px 0 0;
}
.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.modal-header .close-modal {
    position: static;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}
.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.detail-val {
    font-weight: 600;
    font-size: 0.95rem;
}
.replied-box-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
}
.replied-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    color: #38bdf8;
    word-break: break-all;
}
.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-copy:hover { color: white; }

/* ==========================================
   GLOBAL ACCORDION SYSTEM (GPU ACCELERATED)
========================================== */
.accordion-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: grid-template-rows;
    width: 100%;
}

.accordion-wrapper.open {
    grid-template-rows: 1fr;
}

.accordion-content {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.accordion-wrapper.open .accordion-content {
    opacity: 1;
}
/* Dashboard Layout */
.dash-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.dash-sidebar {
    width: 250px;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(5px);
}

.sidebar-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.sidebar-btn span {
    font-size: 1.2rem;
}

/* Add responsive adjustment for dash layout */
@media (max-width: 900px) {
    .dash-layout {
        flex-direction: column;
    }
    .dash-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
}

/* =====================================================
   MOBILE WEB OVERHAUL — Comprehensive Responsive System
   ===================================================== */

/* Global Touch & Mobile Baseline */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Body scroll-lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Mobile menu overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ── 768px: Tablets & Large Phones ── */
@media (max-width: 768px) {

    /* Navigation fixes */
    .nav-container {
        padding: 0 1.2rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    /* Hero Section */
    .hero {
        min-height: 600px;
        padding-top: 70px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.05rem;
        padding: 0 0.5rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    .hero-content {
        padding: 0 1.2rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.8rem;
    }

    /* Stats Section */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-num {
        font-size: 2.2rem;
    }

    .stat-box {
        padding: 1.2rem;
    }

    .stat-box p {
        font-size: 0.75rem;
    }

    /* Section Layout */
    .section-container {
        padding: 3rem 1.2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title {
        margin-bottom: 2.5rem;
    }

    /* Service cards */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem;
    }

    .card {
        padding: 1.8rem 1.5rem;
    }

    /* Product grid */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-card {
        padding: 1.8rem;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }

    .brand-col p {
        margin: 1rem auto;
    }

    .footer-col a {
        text-align: center;
    }

    /* Auth Modal */
    .modal-content {
        padding: 2rem 1.5rem;
        width: 94%;
        max-width: 420px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .auth-form h3 {
        font-size: 1.5rem;
    }

    .auth-form p {
        font-size: 0.9rem;
    }

    .form-options {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }

    /* Toast Notifications */
    .nexus-toast {
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        padding: 14px 20px;
        font-size: 13px;
        border-radius: 14px;
    }

    /* Dashboard */
    .dash-wrapper {
        padding: 90px 1rem 3rem;
    }

    .dash-header h1 {
        font-size: 1.6rem;
    }

    /* Dashboard grids — class-based overrides */
    .dash-overview-grid {
        grid-template-columns: 1fr !important;
    }

    .dash-stats-mini {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dash-history-grid {
        grid-template-columns: 1fr !important;
    }

    /* Topup grid */
    .topup-grid {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard sidebar horizontal scroll on tablet */
    .dash-sidebar {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dash-sidebar::-webkit-scrollbar {
        display: none;
    }

    .sidebar-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Support status grid */
    .status-grid {
        grid-template-columns: 1fr;
    }

    /* Password change form */
    .pw-grid-row {
        grid-template-columns: 1fr !important;
    }

    /* Rental grid */
    .rental-grid {
        grid-template-columns: 1fr;
    }

    /* Service detail view */
    .ssv-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .ssv-metrics {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .ssv-title {
        font-size: 1.2rem;
    }

    /* Premium category nav */
    .premium-category-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .premium-category-card {
        padding: 20px 14px;
    }

    .premium-category-icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    .premium-category-title {
        font-size: 0.95rem;
    }

    .premium-category-subtitle {
        font-size: 0.7rem;
    }

    /* Contact card on support */
    .contact-card {
        padding: 1.8rem 1.2rem;
    }

    .contact-card h2 {
        font-size: 1.6rem !important;
    }
}

/* ── 480px: Small Phones ── */
@media (max-width: 480px) {

    .hero {
        min-height: 520px;
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.15;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-content {
        padding: 0 0.8rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Stats 2→2 stays but tighter */
    .stats-container {
        gap: 0.75rem;
    }

    .stat-num {
        font-size: 1.8rem;
    }

    .stat-box {
        padding: 1rem 0.8rem;
    }

    /* Section container tighter padding */
    .section-container {
        padding: 2.5rem 1rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .section-title p {
        font-size: 0.9rem;
    }

    /* Auth Modal */
    .modal-content {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
    }

    .auth-tab {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .form-group input, .auth-input {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .pin-input {
        letter-spacing: 0.5em;
        font-size: 1.3rem !important;
    }

    .full-width {
        padding: 1rem;
        font-size: 1rem;
    }

    /* Dashboard */
    .dash-wrapper {
        padding: 85px 0.8rem 2rem;
    }

    .dash-header h1 {
        font-size: 1.4rem;
    }

    .dash-stats-mini {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem !important;
    }

    /* Footer */
    footer {
        padding: 3rem 1rem 1.5rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    /* Notification dropdown */
    .notif-dropdown {
        width: 280px;
        right: -80px;
    }

    /* Product cards */
    .product-card {
        padding: 1.5rem;
    }

    .product-card h4 {
        font-size: 1rem;
    }

    .price {
        font-size: 1.4rem;
    }

    /* Premium category → 2 columns tighter */
    .premium-category-nav {
        gap: 8px;
    }

    .premium-category-card {
        padding: 16px 10px;
        border-radius: 14px;
    }

    .premium-category-icon-wrapper {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .premium-category-title {
        font-size: 0.85rem;
    }

    /* Topup quick-amount buttons */
    .topup-amounts {
        gap: 0.4rem;
    }

    /* FAQ */
    .faq-header {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }

    .faq-body {
        padding: 0 1.2rem 1rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Service page header search */
    .catalog-searchbar {
        max-width: 100% !important;
        margin: 0 0.5rem !important;
    }
}

/* ── 360px: Ultra-narrow (iPhone SE, Galaxy A03) ── */
@media (max-width: 360px) {

    .hero h1 {
        font-size: 1.55rem;
    }

    .hero p {
        font-size: 0.88rem;
    }

    .stats-container {
        grid-template-columns: 1fr 1fr;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .stat-box p {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .section-title h2 {
        font-size: 1.3rem;
    }

    .modal-content {
        padding: 1.2rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-container {
        padding: 0 0.8rem;
    }

    .premium-category-nav {
        grid-template-columns: 1fr 1fr;
    }

    .premium-category-title {
        font-size: 0.78rem;
    }

    .premium-category-subtitle {
        font-size: 0.6rem;
    }
}

/* ── Mobile Navigation Enhancements ── */
@media (max-width: 900px) {
    .nav-links {
        z-index: 999;
    }

    .hamburger {
        z-index: 1001;
    }

    /* Ensure nav links have adequate tap targets */
    .nav-links a {
        padding: 0.5rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }
}

/* ── Safe Area Insets for notched phones ── */
@supports (padding: env(safe-area-inset-bottom)) {
    footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .floating-balance {
        bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    #navbar {
        padding-top: env(safe-area-inset-top);
    }
}

/* 🚀 Dynamic Service Horizontal Cards */
.service-list-wrapper {
    position: relative;
    width: 100%;
}

.service-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 280px; /* Show approx 3 rows initially */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    position: relative;
}

.service-list-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(12, 12, 24, 0), rgba(12, 12, 24, 1) 90%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.service-list-container.expanded {
    max-height: 5000px; /* Arbitrary large height to allow expansion */
}

.service-list-container.expanded::after {
    opacity: 0;
}

.service-horizontal-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.service-horizontal-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 230, 255, 0.3);
    transform: translateY(-2px);
}

.svc-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(0, 230, 255, 0.1);
    color: var(--accent-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.svc-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.svc-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svc-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.svc-badges .badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.price-badge {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.time-badge {
    background: rgba(255, 166, 0, 0.1);
    color: #ffa600;
    border: 1px solid rgba(255, 166, 0, 0.2);
}

.show-more-btn {
    display: block;
    width: 200px;
    margin: 0 auto 40px auto;
    padding: 10px 20px;
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.show-more-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

@media (max-width: 600px) {
    .service-list-container {
        grid-template-columns: 1fr;
    }
}
