/* Global Design System - Premium Industrial Neon */
/* Global Design System - Modern Metallurgical Theme */
:root {
    /* Premium Heat Design System */
    --bg-dark: #000000;
    --bg-panel: rgba(15, 23, 42, 0.85);
    --bg-card: #0f172a;
    --glass-border: rgba(255, 255, 255, 0.12);

    /* Vibrant Heat Accents */
    --heat-blue: #2563eb;
    --heat-blue-glow: rgba(37, 99, 235, 0.4);
    --heat-blue-grad: linear-gradient(135deg, #1e40af, #3b82f6);

    --heat-orange: #ff9d00;
    --heat-red: #e11d48;
    --heat-green: #10b981;
    --heat-yellow: #ffcc00;

    /* ... existing accents ... */
    /* Vibrant Red-Orange */
    --accent-orange: #ff9d00;
    /* Rich Safety Orange */
    --accent-yellow: #ffea00;
    /* Bright Neon Yellow */
    --accent-gold: var(--accent-yellow);
    --accent-green: #10b981;
    /* Emerald Green for Career/Success */

    /* Semantic Mappings */
    --accent-primary: var(--accent-orange);
    --accent-secondary: var(--accent-red);
    --accent-heat: var(--accent-red);

    /* Glows - BOOSTED RADIANCE */
    --glow-primary: rgba(255, 157, 0, 0.6);
    --glow-secondary: rgba(255, 61, 0, 0.6);
    --glow-yellow: rgba(255, 234, 0, 0.6);
    --glow-green: rgba(16, 185, 129, 0.6);

    /* Text */
    --text-main: #ffffff;
    --text-muted: #e2e8f0;
    --text-dim: #94a3b8;

    /* Gradients - EXACT IMAGE GRADIENT REPLICATION */
    --grad-primary: linear-gradient(135deg, #ff3d00 0%, #ff9d00 50%, #ffea00 100%);
    --grad-magma: linear-gradient(135deg, #ff3d00 0%, #ffea00 100%);
    --grad-fire: linear-gradient(135deg, #ff3d00 10%, #ff9d00 90%);
    --grad-sunset: linear-gradient(135deg, #ff3d00 0%, #ff9d00 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Fallbacks for backward compatibility */
    --accent-magma: var(--accent-orange);
    --accent-neon: var(--accent-red);
    --accent-glow: var(--glow-secondary);
    --grad-electric: var(--grad-primary);
    --grad-cyber: var(--grad-primary);
    --grad-emerald: var(--grad-primary);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    scrollbar-gutter: stable;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;

    /* PWA App-like Tweaks */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    /* Removed global padding-top here to allow per-page control via :not(.ai-page) or specific classes */
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* --- SUPER PREMIUM MOLTEN BACKGROUND --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: #000000;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-opacity='0.15'%3E%3Cpath d='M69 135 L120 70 L200 80 L250 150 L180 200 Z M200 80 L280 20 L350 40 L310 110 L250 150 Z M120 70 L50 20 L0 80 L10 160 L69 135 Z M250 150 L310 110 L380 180 L340 260 L240 220 Z M180 200 L240 220 L200 310 L110 280 L100 210 Z M69 135 L100 210 L30 290 L0 230 L10 160 Z M110 280 L200 310 L160 390 L60 380 L30 290 Z M240 220 L340 260 L320 350 L230 380 L200 310 Z M310 110 L390 60 L400 130 L380 180 Z M340 260 L400 230 L390 320 L320 350 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 400px 400px;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes moltenMove {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 100%;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
/* Utilities */
.container {
    width: 92%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .container {
        width: 94%;
        padding: 0 32px;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 16px;
    }
}

/* Glassmorphism Cards - Premium Finish */
.glass-panel,
.auth-box,
.dash-card,
.admin-panel,
.ai-gen-card,
.feature-card,
.stat-card,
.cmd-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.4) 100%);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

/* SHIMMER EFFECT */
.shimmer-hover {
    position: relative;
    overflow: hidden;
}

.shimmer-hover::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 45%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 55%);
    transform: rotate(-45deg);
    transition: all 0.7s ease;
    pointer-events: none;
    opacity: 0;
}

/* --- UNIFIED HERO PATTERN --- */
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #aaa 50%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
        letter-spacing: -0.5px;
    }
}

.shimmer-hover:hover::after {
    left: 100%;
    opacity: 1;
}

.glass-panel::before,
.stat-card::before,
.cmd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    z-index: 1;
}

/* Buttons */
/* Vibrant Heat Blue Utilities */
.btn-heat-blue {
    background: var(--heat-blue-grad);
    color: white;
    border: none;
    box-shadow: 0 4px 15px var(--heat-blue-glow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-heat-blue:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px var(--heat-blue-glow);
    filter: brightness(1.1);
}

.text-heat-blue {
    color: var(--heat-blue);
    text-shadow: 0 0 10px var(--heat-blue-glow);
}

.grad-text-blue {
    background: var(--heat-blue-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons - refined */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 12px;
    /* Sleeker radius */
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 4px 20px var(--glow-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow-primary);
    filter: brightness(1.2);
}

.btn-premium-dashboard {
    background: rgba(10, 12, 16, 0.8);
    color: white;
    border: 1px solid var(--accent-orange);
    box-shadow: 0 0 20px rgba(255, 157, 0, 0.4), inset 0 0 10px rgba(255, 157, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-premium-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: premiumShine 3s infinite;
}

.btn-premium-dashboard:hover {
    background: var(--grad-magma);
    color: #000;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px var(--glow-primary);
    border-color: transparent;
}

.rocket-icon {
    background: linear-gradient(180deg, #ff3d00 0%, #ffffff 45%, #ff9d00 85%, #ffea00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.btn-premium-dashboard:hover .rocket-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

@keyframes premiumShine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--accent-magma);
    color: var(--accent-magma);
}

.btn-outline:hover {
    background: var(--accent-magma);
    color: white;
    box-shadow: 0 0 15px var(--glow-magma);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.75rem;
    gap: 8px;
}

body:not(.ai-page) {
    padding-top: calc(74px + env(safe-area-inset-top));
    /* Compensate for fixed header */
}

/* Logo */
/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-heading);
    /* Enforce Outfit font */
    letter-spacing: -0.5px;
    /* Tighten up 'MetaVirta' */
}

/* .logo span removed as text is now unified */

.logo img {
    height: 52px;
    /* Scaled up for premium prominence */
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(-3deg) scale(1.05);
}

.navbar {
    background: rgba(5, 5, 5, 0.85);
    /* Semi-transparent for glass effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(0px);
    height: 74px;
    /* Strict fixed height */
    padding: 0;
    /* Clear padding, use flex centering */
    display: flex;
    /* Ensure flex context for direct children if needed, though container handles it */
    align-items: center;
    position: fixed;
    /* Fixed to top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-family: var(--font-body);
    /* Force consistent font */
}

/* Navbar Container */
.nav-container {
    height: 100%;
    width: 98%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 0px;
    display: grid;
    /* [Logo] [Links] [Actions] on Desktop */
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    z-index: 1002;
}

/* Right Side Actions Group */
.nav-actions {
    justify-self: end;
    /* Push to far right */
    display: flex;
    align-items: center;
    gap: 15px;
    /* Increased gap for clarity */
    padding-right: 0;
    margin-left: auto;
}

/* ... Notification CSS unchanged ... */

/* Centered Navigation Links (Grid-safe Glass Pill) */
.nav-links {
    position: static;
    /* Remove absolute positioning */
    transform: none;
    justify-self: center;
    /* Center in the middle grid track */

    display: flex;
    gap: 15px;
    /* Reduced gap as requested */
    padding: 0;
    /* Remove pill padding */
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
}

.nav-links a {
    color: #a3a3a3;
    font-size: 0.85rem;
    /* Slightly smaller font for better fit */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    /* Pill-style padding */
    border-radius: 30px;
    /* Inner Pill */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    border: 1px solid transparent;
    /* Prevent layout shift on active */
}

/* Orange Icons */
.nav-links a i {
    color: var(--accent-gold);
    font-size: 1rem;
    transition: 0.2s;
}

/* Hover & Active States */
.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    /* Light hover */
}

.nav-links a.active {
    color: white;
    background: rgba(255, 157, 0, 0.15);
    border: 1px solid rgba(255, 157, 0, 0.3);
}

.nav-links a.active i {
    color: var(--accent-orange);
    text-shadow: 0 0 15px var(--glow-primary);
}

/* Remove old Active Bottom Line Indicator */
.nav-links a.active::after {
    display: none;
}

/* Mobile Responsiveness for Nav */
.mobile-menu-btn {
    display: none;
    /* Hidden by default on desktop */
}

/* Responsive Navbar Logic */
@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        justify-self: start;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: white;
        font-size: 1.4rem;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .nav-container {
        /* [Mobile Btn] [Actions] - Logo hidden on top */
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    /* Force hide the logo in the top navbar on mobile */
    #app-logo,
    .navbar .logo {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-actions {
        gap: 10px;
    }
}

/* Enhanced Notification Bell */
.notification-wrapper {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.notification-bell {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.notification-wrapper:hover .notification-bell {
    color: var(--accent-orange);
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.4);
}

/* Badge Fix */
.notif-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    height: 16px;
    width: 16px;
    /* Circle */
    display: flex;
    /* Flex center text */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #050505;
    /* Cutout effect */
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* Unnecessary rule removed */

/* Auth Buttons Container */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Prevent shifting by reserving space for buttons, but keep it flexible */
    justify-content: flex-end;
}

/* Centered Navigation Links (Premium) */

/* Centered Navigation Links (Premium) */
/* Legacy nav-links styles removed to fix duplication */


/* BENTO GRID SYSTEM */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 24px;
    margin-bottom: 60px;
}

.bento-item {
    min-height: 250px;
}

.row-1 {
    min-height: 200px !important;
}

/* MODAL ENGINE */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    color: white;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-magma) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-magma);
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.8rem;
    opacity: 0.5;
    transition: 0.3s;
    z-index: 10;
}

.modal-close:hover {
    opacity: 1 !important;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 25px;
        width: 94%;
        max-height: 90vh;
        border-radius: 16px;
    }

    .modal-close {
        top: 15px;
        right: 15px;
    }
}

/* LAUNCHER BUTTON */
.btn-launch {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover .btn-launch {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--glow-magma);
}

.row-2 {
    grid-row: span 2;
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .span-2,
    .span-3 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3 {
        grid-column: span 1;
    }
}


.stat-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Command Center Grids */
.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.cmd-card,
.dash-card,
.stat-card,
.ai-gen-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Unique Heat Tints - Dual-Tone Fills */
.heat-red {
    border-color: rgba(225, 29, 72, 0.2) !important;
    background: radial-gradient(circle at top right, rgba(225, 29, 72, 0.12), transparent 70%),
        radial-gradient(circle at bottom left, rgba(255, 61, 0, 0.08), transparent 70%),
        var(--bg-card) !important;
}

.heat-red:hover {
    border-color: #e11d48 !important;
    box-shadow: 0 20px 40px rgba(225, 29, 72, 0.25) !important;
    background: radial-gradient(circle at top right, rgba(225, 29, 72, 0.18), transparent 70%),
        radial-gradient(circle at bottom left, rgba(255, 61, 0, 0.12), transparent 70%),
        var(--bg-panel) !important;
}

.heat-red i {
    background: linear-gradient(135deg, #ff3d00, #ff8100) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.heat-orange {
    border-color: rgba(255, 157, 0, 0.2) !important;
    background: radial-gradient(circle at top right, rgba(255, 157, 0, 0.12), transparent 70%),
        radial-gradient(circle at bottom left, rgba(255, 234, 0, 0.08), transparent 70%),
        var(--bg-card) !important;
}

.heat-orange:hover {
    border-color: #ff9d00 !important;
    box-shadow: 0 20px 40px rgba(255, 157, 0, 0.25) !important;
    background: radial-gradient(circle at top right, rgba(255, 157, 0, 0.18), transparent 70%),
        radial-gradient(circle at bottom left, rgba(255, 234, 0, 0.12), transparent 70%),
        var(--bg-panel) !important;
}

.heat-orange i {
    background: linear-gradient(135deg, #ff9d00, #ffea00) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.heat-yellow {
    border-color: rgba(255, 234, 0, 0.2) !important;
    background: radial-gradient(circle at top right, rgba(255, 234, 0, 0.12), transparent 70%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.08), transparent 70%),
        var(--bg-card) !important;
}

.heat-yellow:hover {
    border-color: #ffea00 !important;
    box-shadow: 0 20px 40px rgba(255, 234, 0, 0.25) !important;
    background: radial-gradient(circle at top right, rgba(255, 234, 0, 0.18), transparent 70%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.12), transparent 70%),
        var(--bg-panel) !important;
}

.heat-yellow i {
    background: linear-gradient(135deg, #ffea00, #ffffff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.heat-blue {
    border-color: rgba(37, 99, 235, 0.2) !important;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 70%),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 70%),
        var(--bg-card) !important;
}

.heat-blue:hover {
    border-color: #2563eb !important;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.25) !important;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 70%),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.12), transparent 70%),
        var(--bg-panel) !important;
}

.heat-blue i {
    background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.heat-indigo {
    border-color: rgba(79, 70, 229, 0.2) !important;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 70%),
        radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.08), transparent 70%),
        var(--bg-card) !important;
}

.heat-indigo:hover {
    border-color: #4f46e5 !important;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.25) !important;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.18), transparent 70%),
        radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.12), transparent 70%),
        var(--bg-panel) !important;
}

.heat-indigo i {
    background: linear-gradient(135deg, #4f46e5, #818cf8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.heat-green {
    border-color: rgba(16, 185, 129, 0.2) !important;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 70%),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 70%),
        var(--bg-card) !important;
}

.heat-green:hover {
    border-color: #10b981 !important;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.25) !important;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 70%),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.12), transparent 70%),
        var(--bg-panel) !important;
}

.heat-green i {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}


.cmd-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cmd-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-magma);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.cmd-card:hover::after {
    opacity: 0.1;
}

.cmd-card i {
    font-size: 2.5rem;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform 0.4s ease;
}

.cmd-card:hover i {
    transform: scale(1.1) rotate(-5deg);
}

.cmd-card h3 {
    color: white;
    font-size: 1.4rem;
    font-family: var(--font-heading);
}

.cmd-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-magma);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Page Headers */
.page-header {
    background: transparent;
    text-align: center;
    padding: 120px 0 40px;
}

/* Page Heros - Premium Themed Backgrounds */
.home-hero,
.dashboard-hero,
.quizzes-hero,
.resources-hero,
.ai-hero,
.forum-hero,
.profile-hero,
.career-hero {
    padding: 140px 0 80px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 61, 0, 0.15);
    position: relative;
    overflow: hidden;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    /* Prevents blurriness on Windows/Chrome */
    image-rendering: -webkit-optimize-contrast;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Specific Page Backgrounds */
.home-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.2)), url("../assets/home_hero_premium.png") center/cover no-repeat;
    min-height: 100vh;
    padding: 120px 0 60px;
    /* Matching the 'default' page-header padding */
}

.dashboard-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/metallurgical_hero_bg.png") center/cover no-repeat;
}

.quizzes-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/quizzes_bg.png") center/cover no-repeat;
}

.resources-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/resources_bg.png") center/cover no-repeat;
}

.ai-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/ai_bg_new.png") center/cover no-repeat;
}

.forum-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/forum_bg_new.png") center/cover no-repeat;
}

.profile-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/profile_bg_new.png") center/cover no-repeat;
}

.career-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url("../assets/career_bg_new.png") center/cover no-repeat;
}

.home-hero::after,
.dashboard-hero::after,
.quizzes-hero::after,
.resources-hero::after,
.ai-hero::after,
.forum-hero::after,
.profile-hero::after,
.career-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, #020408, transparent);
    pointer-events: none;
    z-index: 1;
}

.home-hero .container,
.dashboard-hero .container,
.quizzes-hero .container,
.resources-hero .container,
.ai-hero .container,
.forum-hero .container,
.profile-hero .container,
.career-hero .container {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {

    .home-hero,
    .dashboard-hero,
    .quizzes-hero,
    .resources-hero,
    .ai-hero,
    .forum-hero,
    .profile-hero,
    .career-hero {
        padding: 45px 16px 25px;
        background-attachment: scroll;
        min-height: auto;
        text-align: center;
    }

    /* Center hero containers uniformly */
    .home-hero .container,
    .dashboard-hero .container,
    .quizzes-hero .container,
    .resources-hero .container,
    .ai-hero .container,
    .forum-hero .container,
    .profile-hero .container,
    .career-hero .container {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Page header centering (non-hero pages) */
    .page-header {
        padding: 45px 16px 25px;
        text-align: center !important;
    }

    .page-header .container {
        text-align: center;
        align-items: center !important;
    }

    .page-header h1,
    .page-header h2,
    .hero-title {
        margin-top: 0 !important;
        text-align: center !important;
    }
}

/* Standardize home-hero positioning and clear redundant definitions */
.home-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.1;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.hero-title .text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    from {
        text-shadow: 0 0 20px rgba(255, 69, 0, 0.2);
    }

    to {
        text-shadow: 0 0 40px rgba(255, 69, 0, 0.6), 0 0 10px rgba(255, 183, 0, 0.4);
    }
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #cbd5e1;
    margin-bottom: 50px;
    line-height: 1.7;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-btn {
    box-shadow: 0 10px 30px rgba(255, 69, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 69, 0, 0.5);
}

/* Section Titles (Quizzes, Dashboard) */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--accent-orange);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, #1a100a 0%, #000000 100%);
    padding: 20px;
}

.auth-box {
    padding: 50px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: 0.3sbox-shadow;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.2);
}

/* Responsive Polish */
@media (max-width: 768px) {
    .navbar {
        padding: 0;
        height: 65px;
    }

    .nav-container {
        padding: 0 20px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center;
    }

    .nav-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 15px;
        margin-left: auto;
        /* Always keep actions on the right */
        /* Slightly increased gap for thumb friendliness */
    }

    .logo {
        font-size: 1.4rem;
        letter-spacing: 0px;
    }

    .logo img {
        height: 48px;
        margin-right: 10px;
    }

    .nav-links {
        display: none;
    }

    .auth-buttons {
        min-width: 0;
        /* Clear 180px base */
        width: auto;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
    }

    .profile-btn {
        width: 35px;
        /* Slightly scale down avatar for mobile header */
        height: 35px;
    }

    .page-header h1 {
        font-size: 2.4rem;
    }

    .hero-container {
        padding: 40px 20px;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 80vh;
        gap: 30px;
    }

    .hero-title {
        font-size: 2.6rem;
        letter-spacing: 1.5px;
        line-height: 1.1;
        margin-top: 0;
        filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    }

    .dashboard-hero {
        padding: 80px 0 40px;
        background-attachment: scroll;
        /* Performance boost on mobile */
        min-height: auto;
    }

    .dashboard-hero .hero-title {
        font-size: 2.2rem;
        margin-bottom: 5px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        padding: 0;
        line-height: 1.6;
        margin-bottom: 0;
        color: #e2e8f0;
    }

    .hero-btn {
        width: 100%;
        max-width: 300px;
        margin: 20px auto 0 auto;
        padding: 16px 28px;
        font-size: 1.1rem;
        border-radius: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-transform: none;
        letter-spacing: 0.5px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations (Helper classes for JS or CSS anims) */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-btn {
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.profile-btn:hover {
    border-color: var(--accent-orange) !important;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
    transform: scale(1.05);
}

.profile-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 50%;
}

.profile-initials {
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    color: var(--accent-orange);
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.profile-btn:hover .profile-initials {
    color: white;
}

/* Old icon removed */

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 260px;
    background: #0f0f0f;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.dropdown-menu.show {
    display: block;
}

.user-info {
    border-bottom: 1px solid var(--glass-border);
    padding: 10px;
    margin-bottom: 10px;
}

.dropdown-item {
    padding: 12px;
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* --- New Dashboard Command Center --- */
.command-center-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.toggle-btn.active {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.cmd-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    cursor: pointer;
}

.cmd-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 255, 255, 0.05);
    background: rgba(20, 28, 48, 0.95);
    /* Slightly lighter version of bg-panel on hover */
    border-color: rgba(255, 255, 255, 0.2);
}

.cmd-card i {
    font-size: 2.2rem;
    margin-bottom: 18px;
    color: #ffcc00;
    /* Solar Yellow Icon */
    text-shadow: 0 0 12px rgba(255, 204, 0, 0.3);
    transition: transform 0.3s ease;
}

.cmd-card:hover i {
    transform: scale(1.1);
}

.cmd-card h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    transition: all 0.3s ease;
}

.cmd-card:hover h3 {
    color: #ffcc00;
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.cmd-card p {
    color: #94a3b8;
    font-size: 0.82rem;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.5;
}

.cmd-card .btn-link {
    color: #ffcc00;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 22px;
    border: 1.5px solid rgba(255, 204, 0, 0.3);
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 204, 0, 0.03);
    margin-top: 10px;
}

.cmd-card:hover .btn-link {
    background: #ffcc00;
    color: #000;
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.5);
    transform: translateY(-3px) scale(1.02);
    border-color: transparent;
}

.cmd-card .btn-link i {
    font-size: 1rem !important;
    margin-bottom: 0 !important;
    text-shadow: none !important;
    color: inherit !important;
    transition: transform 0.4s ease !important;
}

.cmd-card:hover .btn-link i {
    transform: translateX(6px) scale(1.1) !important;
}

/* Uniform Theme Variants - Vibrant Heat System */
.cmd-card.heat-blue {
    border-color: rgba(37, 99, 235, 0.4);
}

.cmd-card.heat-blue:hover {
    border-color: #2563eb;
    box-shadow: 0 0 35px rgba(37, 99, 235, 0.4), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.cmd-card.heat-orange {
    border-color: rgba(255, 157, 0, 0.4);
}

.cmd-card.heat-orange:hover {
    border-color: #ff9d00;
    box-shadow: 0 0 35px rgba(255, 157, 0, 0.4), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.cmd-card.heat-red {
    border-color: rgba(225, 29, 72, 0.4);
}

.cmd-card.heat-red:hover {
    border-color: #e11d48;
    box-shadow: 0 0 35px rgba(225, 29, 72, 0.4), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.cmd-card.heat-green {
    border-color: rgba(16, 185, 129, 0.4);
}

.cmd-card.heat-green:hover {
    border-color: #10b981;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.4), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.cmd-card.heat-yellow {
    border-color: rgba(255, 204, 0, 0.4);
}

.cmd-card.heat-yellow:hover {
    border-color: #ffcc00;
    box-shadow: 0 0 35px rgba(255, 204, 0, 0.4), 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* Event & Resume Specific Accents */
.cmd-card[data-category="career"] {
    border-top: 3px solid var(--accent-gold);
}

.cmd-card[data-category="learn"] {
    border-top: 3px solid #ff4b1f;
}

.cmd-card[data-category="community"] {
    border-top: 3px solid #2563eb;
}

/* Card Background System */
.card-bg-overlay {
    position: relative;
    overflow: hidden !important;
}

.card-bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--card-bg-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.12;
    /* Subtle presence */
    z-index: 0;
    transition: all 0.4s ease;
}

.card-bg-overlay:hover::before {
    opacity: 0.25;
    transform: scale(1.05);
    /* Slight zoom on hover */
}

/* Ensure content stays on top */
.card-bg-overlay>* {
    position: relative;
    z-index: 2;
}

.card-bg-overlay i {
    z-index: 3 !important;
}

/* --- Visual Unification (Top Widgets) --- */

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(0px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    /* Ensure uniform height if in grid */
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 69, 0, 0.15);
    /* Heat Glow */
    border-color: var(--accent-orange);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
    padding-bottom: 15px;
}

.stat-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.stat-badge {
    background: rgba(255, 215, 0, 0.15);
    color: var(--accent-gold);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 183, 0, 0.2);
}

.stat-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* --- New Dashboard Sections --- */

/* Founder Styling */
.founder-section {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.founder-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-gold);
    box-shadow: 0 0 20px rgba(255, 183, 0, 0.3);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Footer Styling */
/* FOOTER STYLES */
.site-footer {
    background: #050505;
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 30px;
    margin-top: 80px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    /* Auto-fit for fluid responsiveness */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
    align-items: start;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        /* Force stack on very small screens if auto-fit gets too cramped */
        text-align: center;
    }

    .newsletter-form {
        justify-content: center;
        /* Center form on mobile */
    }

    .social-icons-row {
        justify-content: center;
        /* Center icons on mobile */
    }

    .hide-on-mobile {
        display: none !important;
    }
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-contact-info p {
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-contact-info span {
    display: block;
    color: white;
    font-weight: 600;
    margin-top: 5px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    transition: 0.3s;
    font-weight: 500;
}

.footer-col ul li a:hover {
    color: var(--accent-orange);
    padding-left: 5px;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    /* Ensure input and button are side-by-side */
    margin-top: 20px;
    margin-bottom: 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 12px 20px;
    background: #d32f2f;
    /* Red accent from image */
    color: white;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: 0.3s;
    letter-spacing: 1px;
}

.newsletter-form button:hover {
    background: #b71c1c;
}

.social-icons-row {
    display: flex;
    gap: 10px;
}

.social-icons-row a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    /* Square with slight radius like image */
    color: white;
    transition: 0.3s;
    font-size: 0.9rem;
}

.social-icons-row a:hover {
    background: white;
    color: black;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    padding-top: 30px;
}

.copyright a {
    color: var(--accent-gold);
    text-decoration: none;
}

/* --- STATS ROW --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}


.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- Agricola AI Interface --- */

.ai-interface-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.ai-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.ai-chat-area {
    flex: 1;
}

.glass-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 12px 18px;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.glass-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-input-area {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 50px;
    font-family: inherit;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

/* Messaging Styles */
.message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.user-message {
    align-self: flex-end;
    align-items: flex-end;
}

.ai-message {
    align-self: flex-start;
    align-items: flex-start;
}

.message-header {
    margin-bottom: 5px;
    font-size: 0.8rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-message .message-header {
    flex-direction: row-reverse;
}

.sender-name {
    font-weight: 600;
}

.ai-message .sender-name {
    color: var(--accent-orange);
}

.user-message .sender-name {
    color: var(--accent-gold);
}

.timestamp {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.message-body {
    padding: 12px 18px;
    border-radius: 12px;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
}

.ai-message .message-body {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-top-left-radius: 2px;
}

.user-message .message-body {
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-top-right-radius: 2px;
}

/* Markdown Content Styling */
.markdown-body p {
    margin-bottom: 10px;
}

.markdown-body p:last-child {
    margin-bottom: 0;
}

.markdown-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: #e0e0e0;
}

.markdown-body ul,
.markdown-body ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .ai-interface-container {
        flex-direction: column;
    }

    .ai-sidebar {
        width: 100%;
        height: auto;
    }

    .glass-panel {
        height: auto !important;
    }

    .chat-messages {
        height: 500px;
    }
}

/* =========================================
   MOBILE MENU & HAMBURGER (Restored)
   ========================================= */

/* Overlay Menu Background (Darken screen) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    /* Below the menu */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay Menu Side Panel (Left slide-in) */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    /* Slightly narrower, closer to Firebase */
    max-width: 85vw;
    height: 100%;
    background: var(--bg-dark);
    /* Solid dark background instead of heavy glass */
    border-right: 1px solid var(--glass-border);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateX(-100%);
    /* Start completely off-screen left */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
    /* Slide in to 0 */
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-header button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-menu-header button:hover {
    color: white;
}

.mobile-links {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
}

.mobile-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

#mobile-auth-actions {
    margin-top: auto;
    /* Push to bottom if space permits */
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#mobile-auth-actions a {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 8px;
    justify-content: center;
}

#mobile-auth-actions a:hover {
    background: var(--accent-orange);
    color: black;
}

.mobile-links a:hover {
    color: var(--accent-orange);
    padding-left: 10px;
}

.mobile-links i {
    width: 25px;
    text-align: center;
    color: var(--accent-orange);
}


/* Generators Grid (Side-by-Side) */
.generators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: 30px;
    margin-bottom: 40px;
    align-items: stretch;
    /* Equal Height */
}

@media (max-width: 1200px) {
    .generators-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 cols */
    }

    .generators-grid>div:last-child {
        grid-column: span 2;
        /* Span GATE mock on tablet */
    }
}

@media (max-width: 768px) {
    .generators-grid {
        grid-template-columns: 1fr;
        /* 1 col */
    }

    .generators-grid>div:last-child {
        grid-column: span 1;
    }
}

/* --- AI GEN CARD (Unified Premium Style) --- */
.ai-gen-card {
    position: relative;
    padding: 25px;
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(0px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.ai-gen-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Theme: Blue (AI) */
.ai-gen-card.theme-blue {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
    border-color: rgba(255, 69, 0, 0.3);
}

.ai-gen-card.theme-blue:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 15px 40px rgba(255, 69, 0, 0.3);
    /* Stronger Blue Glow */
}

.ai-gen-card.theme-blue .card-icon-bg {
    background: var(--accent-orange);
}

.ai-gen-card.theme-blue h2 {
    color: var(--accent-gold);
}

/* Theme: Green (Upload) */
.ai-gen-card.theme-green {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.ai-gen-card.theme-green:hover {
    border-color: var(--accent-red);
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.3);
    /* Stronger Green Glow */
}

.ai-gen-card.theme-green .card-icon-bg {
    background: var(--accent-red);
}

.ai-gen-card.theme-green h2 {
    color: var(--accent-rose);
}

/* Theme: Orange (GATE) */
.ai-gen-card.theme-orange {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
    border-color: rgba(255, 152, 0, 0.3);
}

.ai-gen-card.theme-orange:hover {
    border-color: #ff9800;
    box-shadow: 0 15px 40px rgba(255, 152, 0, 0.3);
    /* Stronger Orange/Heat Glow */
}

.ai-gen-card.theme-orange .card-icon-bg {
    background: #ff9800;
}

.ai-gen-card.theme-orange h2 {
    color: #ffb74d;
}

/* Internal Elements */
.card-icon-bg {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(0px);
}

.ai-badge {
    background: var(--grad-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.gate-badge {
    background: linear-gradient(45deg, #ff9800, #ff5722);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.ai-input-group {
    display: flex;
    gap: 15px;
}

.ai-input-group input {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    padding: 12px 15px !important;
    transition: all 0.3s ease;
}

.ai-input-group input:focus {
    border-color: var(--accent-orange) !important;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.2);
    background: rgba(0, 0, 0, 0.6) !important;
}

/* Responsive Fix */
@media (max-width: 768px) {
    .ai-gen-panel>div {
        flex-direction: column;
        align-items: stretch !important;
    }

    .ai-input-group {
        flex-direction: column;
        width: 100%;
    }

    .ai-input-group button {
        width: 100% !important;
    }
}



/* USER PROFILE DROPDOWN */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 15px;
    z-index: 2000;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.user-info {
    padding-bottom: 5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.logout-item {
    color: #ff4d4d;
}

.logout-item:hover {
    background: rgba(255, 77, 77, 0.1);
    color: #ff6b6b;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification System Styles */
.notification-wrapper {
    position: relative;
    cursor: pointer;
    margin-right: 15px;
}

.notification-bell {
    position: relative;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    transition: 0.3s;
    padding: 10px;
}

.notification-bell:hover {
    color: white;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 0px;
    background: #f44336;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 50%;
    border: 2px solid #000;
    display: none;
}

.notif-dropdown {
    position: absolute;
    top: 120%;
    right: -10px;
    width: 320px;
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    /* Critical: Hidden by default */
    overflow: hidden;
    animation: fadeInDown 0.2s ease-out;
}

.notif-header {
    padding: 15px;
    border-bottom: 1px solid #222;
    font-weight: bold;
    color: white;
    background: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid #222;
    display: flex;
    gap: 12px;
    transition: 0.2s;
    text-decoration: none;
    color: #ddd;
}

.notif-item:hover {
    background: #1a1a1a;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: white;
}

.notif-time {
    font-size: 0.75rem;
    color: #666;
}

.notif-empty {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   FORUM SPECIFIC STYLES (Migrated)
   ========================================= */
.simple-creator-card {
    background: #0a0a0a;
    border-radius: 16px;
    padding: 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.simple-creator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00, #ff9e42);
    z-index: 2;
}

.creator-wrapper {
    padding: 20px;
}

.input-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    background: #111;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.creator-select {
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    cursor: pointer;
    min-width: 120px;
}

.creator-input-area {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #eee;
    font-size: 1rem;
    padding: 10px;
    outline: none;
    font-family: inherit;
}

.creator-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #ff6b00;
    color: black;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
    font-size: 1.1rem;
}

.creator-send-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.5);
}

.creator-toolbar-row {
    display: flex;
    gap: 25px;
    padding-top: 5px;
}

/* AI Generator Cards (Quizzes) */
.ai-gen-card {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(0px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.ai-gen-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-icon-bg {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(0px);
    z-index: 0;
}

/* Theme Variances */
/* Theme Variances - Metallurgical */
.ai-gen-card.theme-blue {
    border-top: 3px solid var(--accent-plasma);
}

.ai-gen-card.theme-blue .card-icon-bg {
    background: var(--accent-plasma);
}

.ai-gen-card.theme-blue i {
    color: var(--accent-plasma);
}

.ai-gen-card.theme-green {
    border-top: 3px solid var(--accent-radium);
}

.ai-gen-card.theme-green .card-icon-bg {
    background: var(--accent-radium);
}

.ai-gen-card.theme-green i {
    color: var(--accent-radium);
}

.ai-gen-card.theme-orange {
    border-top: 3px solid var(--accent-magma);
}

.ai-gen-card.theme-orange .card-icon-bg {
    background: var(--accent-magma);
}

.ai-gen-card.theme-orange i {
    color: var(--accent-magma);
}

/* Badges */
.ai-badge,
.gate-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-badge {
    background: rgba(255, 69, 0, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 69, 0, 0.3);
}

.gate-badge {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-magma);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Input group fix for cards */
.ai-input-group {
    display: flex;
    z-index: 1;
}

/* Checkbox container for quiz options */
.check-container {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    cursor: pointer;
}

.check-container input {
    accent-color: var(--accent-orange);
}

/* ==========================================================
   GLOBAL RESPONSIVE TYPOGRAPHY & LAYOUT
   Tablet (1024px) + Mobile (768px)
   Desktop is NEVER modified  all rules inside media queries
   ========================================================== */

/*  TABLET: 768px  1024px (iPads, small laptops)  */
@media (max-width: 1024px) {

    /* Hero titles */
    .hero-title,
    .page-header h1 {
        font-size: 2.4rem !important;
        line-height: 1.25 !important;
    }

    /* Section headings (Why We Exist, Team, etc.) */
    h2 {
        font-size: 1.7rem !important;
    }

    /* Card headings */
    .cmd-card h3,
    .stat-card h3,
    .stat-header h3 {
        font-size: 1.1rem !important;
    }

    /* Card body text */
    .cmd-card p,
    .stat-card p,
    .stat-content p {
        font-size: 0.88rem !important;
        line-height: 1.6;
    }

    /* Card icon size */
    .cmd-card i {
        font-size: 2rem !important;
    }

    /* Links */
    .btn-link {
        font-size: 0.82rem !important;
    }

    /* Grid minmax */
    .command-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
        gap: 18px !important;
    }

    /* Founder section */
    .founder-section {
        flex-direction: column !important;
        text-align: center;
    }

    .founder-img {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 20px !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/*  MOBILE: 768px (phones)  */
@media (max-width: 768px) {

    /* Hero titles */
    .hero-title,
    .page-header h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        word-break: break-word;
    }

    .text-gradient {
        font-size: inherit !important;
    }

    /* Hero subtitle */
    .page-header p,
    .dashboard-hero p,
    .home-hero p,
    .quizzes-hero p,
    .resources-hero p,
    .ai-hero p,
    .forum-hero p {
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
    }

    /* Section headings (h2) */
    h2 {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
    }

    /* Sub-headings (h3) */
    h3 {
        font-size: 1rem !important;
    }

    /* Card headings */
    .cmd-card h3,
    .stat-card h3,
    .stat-header h3 {
        font-size: 0.92rem !important;
    }

    /* Card body text */
    .cmd-card p,
    .stat-card p,
    .stat-content p {
        font-size: 0.8rem !important;
        line-height: 1.5;
    }

    /* Card icon size */
    .cmd-card i {
        font-size: 1.6rem !important;
    }

    /* Links & buttons */
    .btn-link {
        font-size: 0.75rem !important;
    }

    .btn-launch {
        font-size: 0.8rem !important;
        padding: 10px 20px !important;
    }

    /* Grids: single column on mobile */
    .command-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Card padding  tighter */
    .cmd-card,
    .dash-card {
        padding: 20px !important;
        border-radius: 18px !important;
    }

    .stat-card {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    /* Glass panels / large sections */
    .glass-panel {
        padding: 24px 16px !important;
        border-radius: 16px !important;
    }

    /* Founder section */
    .founder-section {
        flex-direction: column !important;
        text-align: center;
        gap: 15px !important;
    }

    .founder-img {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto 10px !important;
    }

    .founder-section h3 {
        font-size: 1.2rem !important;
    }

    .founder-section p {
        font-size: 0.78rem !important;
        line-height: 1.5 !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .site-footer {
        padding: 30px 0 !important;
    }

    .site-footer h4 {
        font-size: 1rem !important;
    }

    .site-footer p,
    .site-footer li,
    .site-footer a {
        font-size: 0.78rem !important;
    }

    .copyright p {
        font-size: 0.68rem !important;
    }

    /* Stat badge */
    .stat-badge {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
    }

    /* Glass inputs */
    .glass-input {
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
    }

    /* Inline style overrides for large font-size in style="" */
    [style*="font-size: 3.5rem"],
    [style*="font-size:3.5rem"],
    [style*="font-size: 3rem"],
    [style*="font-size:3rem"] {
        font-size: 1.8rem !important;
    }

    [style*="font-size: 2.8rem"],
    [style*="font-size:2.8rem"],
    [style*="font-size: 2.5rem"],
    [style*="font-size:2.5rem"] {
        font-size: 1.5rem !important;
    }

    [style*="font-size: 2.2rem"],
    [style*="font-size:2.2rem"],
    [style*="font-size: 2rem"],
    [style*="font-size:2rem"] {
        font-size: 1.3rem !important;
    }

    [style*="font-size: 1.8rem"],
    [style*="font-size:1.8rem"] {
        font-size: 1.15rem !important;
    }

    [style*="font-size: 1.6rem"],
    [style*="font-size:1.6rem"] {
        font-size: 1.05rem !important;
    }

    /* Inline grids that use repeat(3, 1fr) */
    div[style*="grid-template-columns: repeat(3"],
    div[style*="grid-template-columns:repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    /* Inline grids with auto-fit */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px"],
    div[style*="grid-template-columns:repeat(auto-fit, minmax(280px"] {
        grid-template-columns: 1fr !important;
    }

    /* Page content padding */
    .page-content {
        padding-top: 10px !important;
    }

    /* Social Icons Mobile Centering */
    .social-icons-row {
        justify-content: center !important;
        margin-top: 20px !important;
        width: 100% !important;
    }
}

/*  VERY SMALL: 420px  */
@media (max-width: 420px) {

    .hero-title,
    .page-header h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.15rem !important;
    }

    .cmd-card h3,
    .stat-card h3 {
        font-size: 0.85rem !important;
    }

    .cmd-card p,
    .stat-card p {
        font-size: 0.75rem !important;
    }
}

/* Animations */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- PREMIUM PAGE LOADER --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh; /* Dynamic Viewport Height for Mobile PWA */
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-metavirta {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 20px;
}

.loader-metavirta::before,
.loader-metavirta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ff9d00;
    animation: loaderSpin 1.5s linear infinite;
}

.loader-metavirta::after {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #e11d48;
    animation: loaderSpin 1s linear infinite reverse;
}

.loader-text {
    font-family: inherit;
    color: white;
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 800;
    animation: pulseText 2s infinite ease-in-out;
}

@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.5; filter: blur(1px); }
    50% { opacity: 1; filter: blur(0px); }
}