/* ============================================
   NAVESA GAMES - CYBER PRISM HEADER
   Mobile-First AAA Gaming Design
   ============================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --navesa-cyan: #00f5ff;
    --navesa-blue: #0080ff;
    --navesa-purple: #a000ff;
    --navesa-magenta: #ff00ff;
    --navesa-mint: #00ffaa;
    --navesa-dark: #0a0e1a;

    /* Timing */
    --shimmer-duration: 3s;
    --pulse-duration: 2s;
    --flow-duration: 4s;

    /* Sizing */
    --glow-size: 10px;
    --border-width: 1px;
}

/* ==================== HEADER CONTAINER ==================== */
.navesa-header {
    position: relative;
    width: 100%;
    padding: 20px 16px;
    overflow: hidden;
    background: linear-gradient(180deg,
        rgba(10, 14, 26, 0.98) 0%,
        rgba(10, 14, 26, 0.95) 100%
    );
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);

    /* Performance */
    contain: layout style paint;
    transform: translateZ(0);
}

/* ==================== GLASS PANEL ==================== */
.navesa-glass-panel {
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 14, 26, 0.4);
    border: var(--border-width) solid rgba(0, 245, 255, 0.3);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow:
        0 0 30px rgba(0, 245, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navesa-glass-panel:hover {
    border-color: rgba(0, 245, 255, 0.6);
    box-shadow:
        0 0 50px rgba(0, 245, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.01);
}

/* ==================== LOGO ==================== */
.navesa-logo {
    position: relative;
    text-align: center;
    margin-bottom: 12px;
}

.navesa-logo-text {
    margin: 0;
    padding: 0;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* NAVESA - Main text */
.logo-main {
    font-family: 'Orbitron', 'Rajdhani', 'Arial Black', sans-serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-transform: uppercase;

    /* Holographic gradient */
    background: linear-gradient(
        90deg,
        var(--navesa-cyan) 0%,
        var(--navesa-blue) 25%,
        var(--navesa-purple) 50%,
        var(--navesa-magenta) 75%,
        var(--navesa-cyan) 100%
    );
    background-size: 400% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Prismatic chromatic aberration */
    filter: drop-shadow(-2px 0 0 rgba(255, 0, 255, 0.6))
            drop-shadow(2px 0 0 rgba(0, 255, 255, 0.6))
            drop-shadow(0 0 20px rgba(0, 245, 255, 0.4));

    /* Animation */
    animation: holographic-shimmer var(--shimmer-duration) ease-in-out infinite;

    /* Performance */
    will-change: background-position, filter;
    transform: translateZ(0);
}

/* GAMES - Subtitle */
.logo-sub {
    font-family: 'Rajdhani', 'Arial Narrow', sans-serif;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--navesa-cyan);
    text-shadow:
        0 0 10px rgba(0, 245, 255, 0.8),
        0 0 20px rgba(0, 245, 255, 0.4);
    animation: neon-pulse var(--pulse-duration) ease-in-out infinite;
}

/* ==================== TAGLINE ==================== */
.navesa-tagline {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tagline-icon {
    font-size: 14px;
    animation: icon-pulse 1.5s ease-in-out infinite;
}

/* ==================== CIRCUIT DECORATION ==================== */
.circuit-decoration {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.6;
}

.circuit-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--navesa-cyan) 50%,
        transparent 100%
    );
    box-shadow: 0 0 4px var(--navesa-cyan);
}

.circuit-node {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navesa-cyan);
    box-shadow: 0 0 8px var(--navesa-cyan);
    animation: node-pulse 2s ease-in-out infinite;
}

/* ==================== LEADERBOARD BUTTON ==================== */
.navesa-leaderboard-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--navesa-cyan);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
    z-index: 40;
}

.navesa-leaderboard-btn:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: var(--navesa-cyan);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.4);
    transform: scale(1.1);
}

.navesa-leaderboard-btn:active {
    transform: scale(0.95);
}

/* ==================== PARTICLES ==================== */
.navesa-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* Individual particle styles (generated by JS) */
.particle-cyan {
    background: var(--navesa-cyan);
    box-shadow: 0 0 4px var(--navesa-cyan);
}

.particle-purple {
    background: var(--navesa-purple);
    box-shadow: 0 0 4px var(--navesa-purple);
}

.particle-mint {
    background: var(--navesa-mint);
    box-shadow: 0 0 4px var(--navesa-mint);
}

/* ==================== ANIMATIONS ==================== */

/* Holographic shimmer */
@keyframes holographic-shimmer {
    0% {
        background-position: 0% 50%;
        filter: drop-shadow(-2px 0 0 rgba(255, 0, 255, 0.6))
                drop-shadow(2px 0 0 rgba(0, 255, 255, 0.6))
                drop-shadow(0 0 20px rgba(0, 245, 255, 0.4))
                hue-rotate(0deg);
    }
    33% {
        background-position: 100% 50%;
        filter: drop-shadow(-3px 0 0 rgba(255, 0, 255, 0.8))
                drop-shadow(3px 0 0 rgba(0, 255, 255, 0.8))
                drop-shadow(0 0 30px rgba(0, 245, 255, 0.6))
                hue-rotate(15deg);
    }
    66% {
        background-position: 0% 50%;
        filter: drop-shadow(-2px 0 0 rgba(255, 0, 255, 0.6))
                drop-shadow(2px 0 0 rgba(0, 255, 255, 0.6))
                drop-shadow(0 0 20px rgba(0, 245, 255, 0.4))
                hue-rotate(-15deg);
    }
    100% {
        background-position: 0% 50%;
        filter: drop-shadow(-2px 0 0 rgba(255, 0, 255, 0.6))
                drop-shadow(2px 0 0 rgba(0, 255, 255, 0.6))
                drop-shadow(0 0 20px rgba(0, 245, 255, 0.4))
                hue-rotate(0deg);
    }
}

/* Neon pulse */
@keyframes neon-pulse {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(0, 245, 255, 0.8),
            0 0 20px rgba(0, 245, 255, 0.4);
        opacity: 0.9;
    }
    50% {
        text-shadow:
            0 0 20px rgba(0, 245, 255, 1),
            0 0 40px rgba(0, 245, 255, 0.6),
            0 0 60px rgba(0, 245, 255, 0.3);
        opacity: 1;
    }
}

/* Icon pulse */
@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Node pulse */
@keyframes node-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px var(--navesa-cyan);
    }
    50% {
        transform: scale(1.5);
        box-shadow: 0 0 16px var(--navesa-cyan);
    }
}

/* Particle float */
@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translate(var(--tx), var(--ty)) scale(1.5);
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tiny phones (Galaxy Fold) */
@media (max-width: 320px) {
    .navesa-header {
        padding: 16px 12px;
    }

    .navesa-glass-panel {
        padding: 16px 12px;
    }

    .logo-main {
        font-size: 24px;
        letter-spacing: 0.2em;
    }

    .logo-sub {
        font-size: 12px;
        letter-spacing: 0.4em;
    }

    .navesa-tagline {
        font-size: 10px;
    }

    .circuit-decoration {
        width: 150px;
    }

    .navesa-leaderboard-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Small phones */
@media (min-width: 321px) and (max-width: 400px) {
    .logo-main {
        font-size: 28px;
        letter-spacing: 0.25em;
    }

    .logo-sub {
        font-size: 14px;
    }

    .circuit-decoration {
        width: 180px;
    }
}

/* Standard phones */
@media (min-width: 401px) and (max-width: 768px) {
    .logo-main {
        font-size: 36px;
        letter-spacing: 0.3em;
    }

    .logo-sub {
        font-size: 18px;
    }

    .navesa-tagline {
        font-size: 13px;
    }

    .circuit-decoration {
        width: 220px;
    }
}

/* Tablets & Desktop */
@media (min-width: 769px) {
    .navesa-header {
        padding: 24px 20px;
    }

    .navesa-glass-panel {
        padding: 32px 24px;
    }

    .logo-main {
        font-size: 48px;
        letter-spacing: 0.35em;
    }

    .logo-sub {
        font-size: 24px;
        letter-spacing: 0.6em;
    }

    .navesa-tagline {
        font-size: 14px;
    }

    .circuit-decoration {
        width: 300px;
    }

    .navesa-leaderboard-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

/* ==================== ACCESSIBILITY ==================== */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .logo-main {
        animation: none;
        filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.4));
    }

    .logo-sub {
        animation: none;
    }

    .tagline-icon,
    .circuit-node {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .navesa-glass-panel {
        border-width: 2px;
        border-color: var(--navesa-cyan);
    }

    .logo-main {
        filter: drop-shadow(0 0 5px var(--navesa-cyan));
    }
}

/* ==================== PERFORMANCE ==================== */

/* GPU acceleration for animated elements */
.logo-main,
.logo-sub,
.navesa-glass-panel,
.navesa-leaderboard-btn {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 🚀 MOBILE OPTIMIZATION: Disable expensive animations on low-end devices */
.low-end-device .logo-main {
    /* Disable expensive holographic-shimmer animation */
    animation: none !important;

    /* Simplify filter to single drop-shadow */
    filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.5)) !important;

    /* Keep gradient but static */
    background-position: 50% 50%;

    /* Remove will-change to reduce memory */
    will-change: auto !important;
}

/* 🚀 Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .logo-main {
        animation: none !important;
        filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.5)) !important;
    }
}
