/* ============================================================
   HYPER-MODERN SAAS THEME (V3)
   A revolutionary layout override replacing the legacy sidebar.
   ============================================================ */

/* ---------- NEW GLOBAL VARIABLES ---------- */
:root {
    /* Super Premium Dark Background (Apple/Vercel inspired) */
    --hyper-bg: #09090b; /* Zinc 950 */
    --hyper-card-bg: rgba(24, 24, 27, 0.6);
    --hyper-card-border: rgba(255, 255, 255, 0.08);
    --hyper-text-main: #f4f4f5;
    --hyper-text-sub: #a1a1aa;
    --hyper-primary: #3b82f6; /* Blue 500 */
    --hyper-accent: #8b5cf6; /* Violet 500 */
    --hyper-grad: linear-gradient(135deg, #3b82f6, #ec4899);
    --hyper-success: #10b981;
    --hyper-danger: #ef4444;
}

[data-theme="light"] {
    --hyper-bg: #f8fafc; /* Slate 50 */
    --hyper-card-bg: rgba(255, 255, 255, 0.7);
    --hyper-card-border: rgba(0, 0, 0, 0.06);
    --hyper-text-main: #0f172a;
    --hyper-text-sub: #64748b;
}

/* ---------- RESET & CORE ---------- */
body {
    background: var(--hyper-bg);
    color: var(--hyper-text-main);
    font-family: 'Outfit', 'Inter', sans-serif !important;
    padding-top: 80px; /* Space for Top Nav */
    transition: background 0.3s ease;
}

/* Override old wrapper and main layout */
.wrapper {
    display: block !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main, .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Hide legacy elements */
.sidebar, .overlay-mobile, .top-nav, .header {
    display: none !important;
}

/* ---------- BACKGROUND ANIMATION ---------- */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 50vh;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20vh; right: -10vw;
    width: 60vw; height: 60vh;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ---------- SAAS NAVBAR ---------- */
.saas-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    background: rgba(9, 9, 11, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--hyper-card-border);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

[data-theme="light"] .saas-navbar {
    background: rgba(255, 255, 255, 0.75);
}

.saas-nav-container {
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saas-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-box {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--hyper-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--hyper-text-main);
    letter-spacing: -0.5px;
}

.saas-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0; padding: 0;
}

.saas-links a {
    text-decoration: none;
    color: var(--hyper-text-sub);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.saas-links a:hover {
    color: var(--hyper-text-main);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .saas-links a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.saas-links a.active {
    color: #fff;
    background: var(--hyper-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.saas-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-switch {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--hyper-card-bg);
    border: 1px solid var(--hyper-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--hyper-text-sub);
    transition: all 0.2s;
}
.theme-switch:hover { color: var(--hyper-primary); border-color: var(--hyper-primary); }

.saas-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    background: var(--hyper-card-bg);
    border: 1px solid var(--hyper-card-border);
    cursor: pointer;
    transition: all 0.2s;
}

.saas-user-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .saas-user-box:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

.saas-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--hyper-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    position: relative;
}

.saas-status-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid var(--hyper-bg);
}

.saas-user-info { display: flex; flex-direction: column; justify-content: center; }
.saas-username { font-size: 13px; font-weight: 600; color: var(--hyper-text-main); line-height: 1; margin-bottom: 2px; }
.saas-balance { font-size: 11px; font-weight: 700; color: var(--hyper-primary); line-height: 1; }

.saas-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transition: all 0.2s;
}
.saas-logout:hover { background: #ef4444; color: #fff; }

.saas-mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--hyper-text-main);
}

/* ---------- GLASS CARDS UPDATE ---------- */
.glass-card {
    background: var(--hyper-card-bg) !important;
    border: 1px solid var(--hyper-card-border) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.custom-option {
    background: var(--hyper-card-bg) !important;
}

table {
    background: transparent !important;
}

.table-responsive {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--hyper-card-border);
}

.btn-primary {
    background: var(--hyper-grad) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3) !important;
    border-radius: 10px !important;
}

/* Inputs & Forms Override */
.form-input {
    width: 100%; border-radius: 12px; border: 1px solid var(--hyper-card-border);
    background: rgba(0,0,0,0.2) !important; color: var(--hyper-text-main) !important;
    padding: 14px 18px; margin-bottom: 20px; font-family: inherit; font-size: 14px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}
[data-theme="light"] .form-input { background: rgba(255,255,255,0.5) !important; }

.form-input:focus {
    outline: none; border-color: var(--hyper-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
    transform: translateY(-2px);
}

.form-label {
    display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700;
    color: var(--hyper-text-sub); text-transform: uppercase; letter-spacing: 0.5px;
}

/* Global Glowing Buttons (for tao-don and forms) */
.btn-glow {
    padding: 14px 28px; width: 100%; border-radius: 16px; border: none; font-weight: 700; font-size: 15px; cursor: pointer; color: #fff; background: var(--hyper-grad); text-decoration: none; display: inline-flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.btn-glow:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4); }
.btn-glow:disabled { opacity: 0.5; cursor: not-allowed; animation: none; transform: none; box-shadow: none; }

/* Add slight scaling hover for cards */
.stat-card, .level-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.stat-card:hover, .level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* ---------- RESPONSIVE MOBILE NAVIGATION ---------- */
@media (max-width: 900px) {
    .saas-links {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        top: auto;
        background: rgba(9, 9, 11, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: row;
        justify-content: space-around;
        padding: 10px 5px;
        border-top: 1px solid var(--hyper-card-border);
        z-index: 1001;
        transform: translateY(100%);
        transition: transform 0.3s;
    }
    
    [data-theme="light"] .saas-links {
        background: rgba(255, 255, 255, 0.9);
    }
    
    body { padding-bottom: 70px; } /* Space for bottom nav */
    
    /* Make the mobile menu active state show the bottom nav */
    .saas-links.active {
        transform: translateY(0);
    }
    
    .saas-links a {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        font-size: 11px;
    }
    
    .saas-links a i { font-size: 20px; }
    
    .saas-links a span { display: block; }
    
    .saas-actions { display: flex; gap: 8px; }
    
    .saas-username, .saas-balance { display: none; } /* Hide names, keep only avatar circle */
    .saas-user-box { padding: 0; border: none; background: transparent !important; }

    /* Bottom Nav Styles */
    .saas-links {
        padding-bottom: env(safe-area-inset-bottom, 15px);
    }
}
