/**
 * HOMEPAGE - Premium Portal Style
 * Zero-scroll layout with hologram silhouette panels
 * Dynamic motion design with slow-motion focus effects
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --home-anim-speed: 20s;
    --home-anim-speed-fast: 6s;
    --portal-max-width: 600px;
    --panel-accent: rgba(0, 212, 255, 0.5);
    --panel-accent-glow: rgba(0, 212, 255, 0.15);
    
    /* Metallic colors */
    --metal-shine: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 30%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.2) 100%);
    --metal-border: linear-gradient(135deg,
        rgba(180, 200, 220, 0.4) 0%,
        rgba(100, 120, 140, 0.3) 25%,
        rgba(60, 80, 100, 0.4) 50%,
        rgba(100, 120, 140, 0.3) 75%,
        rgba(180, 200, 220, 0.4) 100%);
}

/* ========================================
   HOMEPAGE CONTAINER - Enhanced Background
   ======================================== */
#home-view {
    display: none;
    position: relative;
    overflow: hidden;
    
    /* Multi-layer premium background */
    background: 
        /* Animated gradient orbs */
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(0, 100, 150, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 70%, rgba(100, 0, 150, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 50, 100, 0.1) 0%, transparent 60%),
        /* Base gradient */
        radial-gradient(ellipse at top center, #0d1525 0%, #060a10 50%, #020305 100%);
}

/* Animated background particles/stars */
#home-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(0, 212, 255, 0.2), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(0, 212, 255, 0.15), transparent),
        radial-gradient(2px 2px at 15% 80%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 35% 55%, rgba(0, 212, 255, 0.1), transparent),
        radial-gradient(1px 1px at 75% 15%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 250px 250px;
    animation: starDrift 60s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes starDrift {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-250px) translateX(50px); }
}

/* Slow motion active state */
#home-view.slow-motion-active {
    /* Subtle vignette */
}

#home-view.slow-motion-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 15;
    animation: vignetteIn 0.3s ease-out forwards;
}

@keyframes vignetteIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Silhouette panels dim during slow-mo */
#home-view.slow-motion-active .silhouette-panel {
    filter: brightness(0.5) blur(3px);
    transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo section dims during slow-mo */
#home-view.slow-motion-active .portal-logo-section {
    filter: brightness(0.6) blur(1px);
    transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer dims during slow-mo */
#home-view.slow-motion-active .portal-footer {
    filter: brightness(0.5);
    transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#home-view.active-view {
    display: flex !important;
    min-height: 100vh !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

/* Hide header and bottom bars on home */
body:has(#home-view.active-view) .game-header,
body:has(#home-view.active-view) .bottom-bar,
body:has(#home-view.active-view) .shared-bottom-bar,
body:has(#home-view.active-view) .mobile-bottom-bar,
body:has(#home-view.active-view) [class*="bottom-bar"],
body:has(#home-view.active-view) nav[class*="mobile"] {
    display: none !important;
}

/* ========================================
   HOLOGRAM SILHOUETTE PANELS (Desktop)
   Premium metallic framed glass panels
   ======================================== */
.silhouette-panel {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: clamp(140px, 18vw, 220px) !important;
    height: 70vh !important;
    max-height: 600px !important;
    overflow: hidden !important;
    pointer-events: auto;
    z-index: 5 !important;
    display: block !important;
    cursor: grab;
    
    /* Metallic frame - double border effect */
    border: 2px solid transparent;
    border-radius: 16px;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    
    /* Premium metallic background with depth */
    background: 
        /* Inner glass */
        linear-gradient(180deg, rgba(0, 25, 45, 0.9) 0%, rgba(0, 15, 30, 0.95) 100%),
        /* Metallic border gradient */
        linear-gradient(135deg, 
            rgba(120, 160, 200, 0.5) 0%,
            rgba(60, 90, 120, 0.3) 20%,
            rgba(30, 50, 70, 0.4) 40%,
            rgba(60, 90, 120, 0.3) 60%,
            rgba(120, 160, 200, 0.4) 80%,
            rgba(180, 220, 255, 0.5) 100%
        );
    
    /* Complex shadow for depth */
    box-shadow: 
        /* Outer glow */
        0 0 40px rgba(0, 212, 255, 0.15),
        0 0 80px rgba(0, 150, 200, 0.08),
        /* Inner shadow for depth */
        inset 0 0 30px rgba(0, 212, 255, 0.08),
        /* Top highlight */
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        /* Bottom shadow */
        inset 0 -2px 0 rgba(0, 0, 0, 0.2),
        /* 3D depth */
        4px 4px 20px rgba(0, 0, 0, 0.4),
        -2px -2px 15px rgba(0, 150, 200, 0.05);
    
    /* Smooth transitions */
    transition: 
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Metallic shine overlay */
.silhouette-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border-radius: 14px;
    z-index: 2;
    pointer-events: none;
}

/* Bottom vignette */
.silhouette-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(0deg, rgba(0, 10, 20, 0.98) 0%, rgba(0, 10, 20, 0.6) 50%, transparent 100%);
    border-radius: 0 0 14px 14px;
    z-index: 3;
    pointer-events: none;
}

.silhouette-panel.panel-left {
    left: 20px !important;
}

.silhouette-panel.panel-right {
    right: 20px !important;
}

/* Hover effect - panels glow and lift */
.silhouette-panel.panel-left:hover,
.silhouette-panel.panel-right:hover {
    box-shadow: 
        0 0 60px rgba(0, 212, 255, 0.25),
        0 0 100px rgba(0, 150, 200, 0.15),
        inset 0 0 40px rgba(0, 212, 255, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15),
        6px 6px 25px rgba(0, 0, 0, 0.5),
        -3px -3px 20px rgba(0, 150, 200, 0.08);
    transform: translateY(-50%) scale(1.01);
}

/* Top vignette - separate element */
.silhouette-panel .panel-frame-highlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(180deg, rgba(0, 10, 20, 0.95) 0%, rgba(0, 10, 20, 0.5) 50%, transparent 100%);
    z-index: 3;
    pointer-events: none;
    border-radius: 14px 14px 0 0;
}

/* Silhouette track container - JS controls transform */
.silhouette-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 15px;
    will-change: transform;
}

/* Silhouette images with depth effect */
.silhouette-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    padding: 10%;
    opacity: 0.45;
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(0, 212, 255, 0.4));
    flex-shrink: 0;
    transition: opacity 0.3s ease;
    /* NO filter transition - it causes black flash during state changes */
}

/* Brighter on panel hover (desktop only) */
.silhouette-panel.panel-left:hover .silhouette-img,
.silhouette-panel.panel-right:hover .silhouette-img {
    opacity: 0.6;
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(0, 212, 255, 0.6));
}

/* Scanline overlay for CRT/hologram feel */
.silhouette-panel .panel-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
    z-index: 4;
    border-radius: 14px;
    mix-blend-mode: multiply;
}

/* Mobile panel - hidden on desktop (created by JS) */
.silhouette-panel.panel-mobile {
    display: none !important;
}

/* ========================================
   MAIN PORTAL CONTENT
   ======================================== */
.home-portal {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    padding: 20px !important;
    padding-left: clamp(160px, 20vw, 240px) !important; /* Leave space for left panel */
    padding-right: clamp(160px, 20vw, 240px) !important; /* Leave space for right panel */
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: transparent !important;
    pointer-events: none; /* Allow clicks through to panels */
}

/* Re-enable pointer events on interactive elements */
.home-portal > * {
    pointer-events: auto;
}

/* ========================================
   AUTH CORNER (top right)
   ======================================== */
.home-auth-corner {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.home-auth-buttons {
    display: flex;
    gap: 10px;
}

.home-auth-btn {
    padding: 8px 16px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.home-auth-login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}

.home-auth-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.home-auth-signup {
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    border: none;
    color: #000;
    font-weight: 700;
}

.home-auth-signup:hover {
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

/* Profile link when logged in - Premium Metallic Design */
.home-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    
    /* Boxy rectangle shape */
    border-radius: 6px;
    
    /* Metallic layered background */
    background: 
        /* Top highlight edge */
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
        /* Base dark glass */
        linear-gradient(180deg, rgba(20, 35, 55, 0.95) 0%, rgba(10, 20, 35, 0.98) 100%);
    
    /* Double border metallic effect */
    border: 1px solid rgba(100, 130, 160, 0.4);
    box-shadow: 
        /* Outer glow */
        0 2px 12px rgba(0, 0, 0, 0.4),
        /* Inner top highlight */
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        /* Inner bottom shadow */
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        /* Left/right metallic edges */
        inset 1px 0 0 rgba(255, 255, 255, 0.03),
        inset -1px 0 0 rgba(255, 255, 255, 0.03);
    
    /* Smooth transitions */
    transition: 
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
    
    /* Subtle breathing animation for idle state */
    animation: profileBreathing 4s ease-in-out infinite;
}

@keyframes profileBreathing {
    0%, 100% { 
        box-shadow: 
            0 2px 12px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2),
            inset 1px 0 0 rgba(255, 255, 255, 0.03),
            inset -1px 0 0 rgba(255, 255, 255, 0.03);
    }
    50% { 
        box-shadow: 
            0 2px 16px rgba(0, 212, 255, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2),
            inset 1px 0 0 rgba(255, 255, 255, 0.05),
            inset -1px 0 0 rgba(255, 255, 255, 0.05);
    }
}

/* Metallic shine sweep on hover */
.home-profile-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.08), 
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

/* Accent glow line at bottom */
.home-profile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-profile-link:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(0, 212, 255, 0.5);
    animation: none; /* Pause breathing on hover */
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 212, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.home-profile-link:hover::before {
    left: 100%;
}

.home-profile-link:hover::after {
    opacity: 1;
}

.home-profile-link:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}

/* Avatar container - boxy with metallic frame */
.home-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Allow corner accents to show */
    
    /* Subtle dark background - no gradient */
    background: rgba(0, 20, 40, 0.8);
    
    /* Metallic border frame */
    border: 1px solid rgba(0, 212, 255, 0.35);
    box-shadow: 
        0 0 8px rgba(0, 212, 255, 0.15),
        inset 0 0 10px rgba(0, 0, 0, 0.4);
    
    transition: all 0.3s ease;
}

/* Inner corner accents for avatar */
.home-profile-avatar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 6px;
    height: 6px;
    border-top: 2px solid rgba(0, 212, 255, 0.7);
    border-left: 2px solid rgba(0, 212, 255, 0.7);
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.home-profile-avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 6px;
    height: 6px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.7);
    border-right: 2px solid rgba(0, 212, 255, 0.7);
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.home-profile-link:hover .home-profile-avatar {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 
        0 0 15px rgba(0, 212, 255, 0.25),
        inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.home-profile-link:hover .home-profile-avatar::before,
.home-profile-link:hover .home-profile-avatar::after {
    border-color: #00d4ff;
    width: 8px;
    height: 8px;
}

.home-profile-avatar i {
    font-size: 1.1rem;
    color: rgba(0, 212, 255, 0.7);
    transition: color 0.3s ease, transform 0.3s ease;
}

.home-profile-link:hover .home-profile-avatar i {
    color: #00d4ff;
    transform: scale(1.1);
}

.home-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.home-profile-link:hover .home-profile-avatar img {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* Username styling */
.home-profile-name {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.home-profile-link:hover .home-profile-name {
    color: #fff;
}

/* Arrow indicator */
.home-profile-arrow {
    font-size: 0.6rem;
    color: rgba(0, 212, 255, 0.4);
    transition: transform 0.3s ease, color 0.3s ease;
}

.home-profile-link:hover .home-profile-arrow {
    color: rgba(0, 212, 255, 0.8);
    transform: translateX(3px);
}

/* ========================================
   LOGO SECTION
   ======================================== */
.portal-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.portal-logo-frame {
    position: relative;
    /* Smooth scaling: min 50px, preferred 8vw, max 110px */
    width: clamp(50px, 8vw, 110px) !important;
    height: clamp(50px, 8vw, 110px) !important;
}

.portal-logo-glow {
    position: absolute;
    inset: -25%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.portal-logo {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
    object-fit: contain;
}

.portal-tagline {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    /* Smooth scaling: min 1.4rem, preferred 2.5vw, max 2.5rem */
    font-size: clamp(1.4rem, 2.5vw, 2.5rem) !important;
    /* Smooth letter-spacing: min 3px, preferred 0.5vw, max 6px */
    letter-spacing: clamp(3px, 0.5vw, 6px) !important;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.portal-subtitle {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #00d4ff;
    margin: 0;
    text-transform: uppercase;
}

.portal-description {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 8px 0 0 0;
    text-align: center;
    max-width: 420px;
    line-height: 1.4;
}

/* ========================================
   NAV BUTTONS - Premium with Focus Effect
   ======================================== */
.portal-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    max-width: var(--portal-max-width);
    margin-bottom: 18px;
    position: relative;
    z-index: 20;
}

.portal-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 22px;
    text-decoration: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    
    /* Base styling */
    background: 
        /* Metallic shine overlay */
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%),
        /* Glass background */
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    
    /* Smooth transitions for dramatic effect */
    transition: 
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        filter 0.4s ease;
    
    /* Transform origin for scale */
    transform-origin: center center;
}

/* Inner glow line at top */
.portal-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0.7;
}

/* Hover state - standard */
.portal-nav-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.5),
        0 0 30px var(--btn-glow-color, rgba(0, 212, 255, 0.2)),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* FOCUSED STATE - Dramatic zoom effect */
.portal-nav-btn.portal-btn-focused {
    transform: scale(1.25) translateY(-8px);
    z-index: 100;
    border-color: var(--btn-accent-color, rgba(0, 212, 255, 0.8));
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 80px var(--btn-glow-color, rgba(0, 212, 255, 0.4)),
        0 0 120px var(--btn-glow-color, rgba(0, 212, 255, 0.2)),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 30px var(--btn-glow-color, rgba(0, 212, 255, 0.1));
    filter: brightness(1.1);
}

/* Dimmed state for other buttons */
.portal-nav-btn.portal-btn-dimmed {
    filter: brightness(0.5) blur(1px);
    transform: scale(0.95);
    opacity: 0.6;
}

/* Active/click state - maintain scale with satisfying press effect */
.portal-nav-btn:active {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.2);
    transition: transform 0.05s ease, filter 0.05s ease;
}

.portal-nav-btn.portal-btn-focused:active {
    transform: scale(1.28) translateY(-6px);
    filter: brightness(1.25);
}

.portal-nav-btn .btn-icon {
    font-size: 1.5rem;
    color: #00d4ff;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.portal-nav-btn:hover .btn-icon,
.portal-nav-btn.portal-btn-focused .btn-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px currentColor);
}

.portal-nav-btn .btn-label {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 1.35rem;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.portal-nav-btn .btn-chevron {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, color 0.3s ease;
}

.portal-nav-btn:hover .btn-chevron,
.portal-nav-btn.portal-btn-focused .btn-chevron {
    color: rgba(255, 255, 255, 0.7);
    transform: translateX(4px);
}

/* Button color variants with CSS custom properties */
.portal-nav-btn[data-section="stats"] { 
    --btn-accent-color: rgba(0, 212, 255, 0.6);
    --btn-glow-color: rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.25); 
}
.portal-nav-btn[data-section="stats"]:hover,
.portal-nav-btn[data-section="stats"].portal-btn-focused { 
    border-color: rgba(0, 212, 255, 0.7); 
}
.portal-nav-btn[data-section="stats"] .btn-icon { color: #00d4ff; }

.portal-nav-btn[data-section="compare"] { 
    --btn-accent-color: rgba(255, 107, 0, 0.6);
    --btn-glow-color: rgba(255, 107, 0, 0.3);
    border-color: rgba(255, 107, 0, 0.25); 
}
.portal-nav-btn[data-section="compare"]:hover,
.portal-nav-btn[data-section="compare"].portal-btn-focused { 
    border-color: rgba(255, 107, 0, 0.7); 
}
.portal-nav-btn[data-section="compare"] .btn-icon { color: #ff6b00; }

.portal-nav-btn[data-section="rankings"] { 
    --btn-accent-color: rgba(255, 215, 0, 0.6);
    --btn-glow-color: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.25); 
}
.portal-nav-btn[data-section="rankings"]:hover,
.portal-nav-btn[data-section="rankings"].portal-btn-focused { 
    border-color: rgba(255, 215, 0, 0.7); 
}
.portal-nav-btn[data-section="rankings"] .btn-icon { color: #ffd700; }

.portal-nav-btn[data-section="community"] { 
    --btn-accent-color: rgba(153, 102, 255, 0.6);
    --btn-glow-color: rgba(153, 102, 255, 0.3);
    border-color: rgba(153, 102, 255, 0.25); 
}
.portal-nav-btn[data-section="community"]:hover,
.portal-nav-btn[data-section="community"].portal-btn-focused { 
    border-color: rgba(153, 102, 255, 0.7); 
}
.portal-nav-btn[data-section="community"] .btn-icon { color: #9966ff; }

/* ========================================
   TOURNAMENT BUTTON - Premium with Focus Effect
   ======================================== */
.portal-tournament-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: var(--portal-max-width);
    padding: 20px 32px;
    margin-bottom: 18px;
    text-decoration: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    z-index: 20;
    
    /* Premium gradient background */
    background: 
        /* Metallic shine sweep */
        linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 40%, rgba(255, 255, 255, 0.05) 100%),
        /* Main gradient */
        linear-gradient(135deg, #ff0044 0%, #ff3366 50%, #ff0044 100%);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 4px 25px rgba(255, 0, 68, 0.5),
        0 0 40px rgba(255, 0, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    
    /* Match nav button transitions */
    transition: 
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        filter 0.4s ease;
    
    transform-origin: center center;
    animation: tournamentPulse 3s ease-in-out infinite;
}

/* Inner shine line */
.portal-tournament-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

/* Moving shine effect */
.portal-tournament-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: tournamentShine 4s ease-in-out infinite;
}

@keyframes tournamentPulse {
    0%, 100% { 
        box-shadow: 
            0 4px 25px rgba(255, 0, 68, 0.5),
            0 0 40px rgba(255, 0, 68, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    50% { 
        box-shadow: 
            0 6px 35px rgba(255, 0, 68, 0.6),
            0 0 60px rgba(255, 0, 68, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

@keyframes tournamentShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.portal-tournament-btn:hover {
    transform: translateY(-4px) scale(1.03);
    animation: none;
    box-shadow: 
        0 12px 40px rgba(255, 0, 68, 0.6),
        0 0 60px rgba(255, 0, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* FOCUSED STATE - Dramatic zoom effect (same as nav buttons) */
.portal-tournament-btn.portal-btn-focused {
    transform: scale(1.25) translateY(-8px);
    z-index: 100;
    animation: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 20px 70px rgba(255, 0, 68, 0.7),
        0 0 100px rgba(255, 0, 68, 0.4),
        0 0 150px rgba(255, 0, 68, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    filter: brightness(1.1);
}

/* Dimmed state */
.portal-tournament-btn.portal-btn-dimmed {
    filter: brightness(0.5) blur(1px);
    transform: scale(0.95);
    opacity: 0.6;
    animation: none;
}

/* Active/click state - maintain scale with satisfying press effect */
.portal-tournament-btn:active {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.2);
    transition: transform 0.05s ease, filter 0.05s ease;
}

.portal-tournament-btn.portal-btn-focused:active {
    transform: scale(1.28) translateY(-6px);
    filter: brightness(1.25);
}

.portal-tournament-btn .btn-icon {
    font-size: 1.6rem;
    color: #fff;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.portal-tournament-btn:hover .btn-icon,
.portal-tournament-btn.portal-btn-focused .btn-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.portal-tournament-btn .btn-label {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 1.5rem;
    letter-spacing: 5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.portal-tournament-btn .btn-chevron {
    position: absolute;
    right: 18px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, color 0.3s ease;
}

.portal-tournament-btn:hover .btn-chevron,
.portal-tournament-btn.portal-btn-focused .btn-chevron {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

/* ========================================
   FOOTER
   ======================================== */
.portal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px;
    /* Position fixed at bottom - outside home-portal to avoid screen shake */
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 20;
    pointer-events: auto;
}

.portal-footer-link {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.portal-footer-link[href="/about"] {
    padding: 5px 12px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 14px;
    color: rgba(0, 212, 255, 0.7);
    font-weight: 500;
}

.portal-footer-link[href="/about"]:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

.portal-footer-link:hover {
    color: #00d4ff;
}

.portal-footer-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.portal-version {
    font-family: var(--font-mono, 'Orbitron', monospace);
    font-size: 0.65rem;
    color: rgba(0, 212, 255, 0.5);
}

/* ========================================
   ABOUT PAGE
   ======================================== */
#about-view {
    display: none;
}

#about-view.active-view {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    padding-bottom: 80px;
    background: radial-gradient(ellipse at top center, #0d1525 0%, #060a10 50%, #020305 100%);
    overflow-y: auto;
    z-index: 50;
}

/* Ensure home view and silhouette panels are hidden when about is active */
body:has(#about-view.active-view) #home-view,
body:has(#about-view.active-view) .silhouette-panel {
    display: none !important;
}

.about-page {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.about-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00d4ff;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 40px;
    transition: all 0.2s ease;
}

.about-back-link:hover {
    opacity: 0.8;
    transform: translateX(-4px);
}

.about-content h1 {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 2.5rem;
    letter-spacing: 4px;
    color: #fff;
    margin-bottom: 24px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.about-intro {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto 40px;
}

.about-intro strong {
    color: #00d4ff;
}

/* About Section Titles */
.about-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 16px;
}

.about-section-title i {
    color: #00d4ff;
}

/* Features Section */
.about-features-section {
    margin: 40px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.about-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
}

.about-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.about-features-list li:hover {
    background: rgba(0, 212, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.2);
}

.about-features-list li i {
    color: #00d4ff;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Creator Section */
.about-creator-section {
    margin: 40px 0;
}

.about-creator-section p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
}

.about-creator-section strong {
    color: #fff;
}

/* Version Section */
.about-version-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.about-version {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   RESPONSIVE - MOBILE
   Single bottom hologram panel layout
   ======================================== */
@media (max-width: 600px) {
    /* About page mobile adjustments */
    .about-content h1 {
        font-size: 2rem;
    }
    
    .about-intro {
        font-size: 0.95rem;
    }
    
    .about-features-list {
        grid-template-columns: 1fr;
    }
    
    /* Hide side panels on mobile */
    .silhouette-panel.panel-left,
    .silhouette-panel.panel-right {
        display: none !important;
    }
    
    /* Show mobile bottom panel - horizontal scrolling bar with slingshot */
    .silhouette-panel.panel-mobile {
        display: block !important;
        position: fixed !important;
        top: auto !important;
        bottom: 100px !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        width: auto !important;
        height: 75px !important;
        max-height: none !important;
        border-radius: 12px;
        z-index: 25 !important;
        
        /* Enable touch for slingshot interaction */
        pointer-events: auto !important;
        touch-action: none !important;
        cursor: grab !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-touch-callout: none !important;
        
        /* Hologram background */
        background: 
            linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
            radial-gradient(ellipse at center, rgba(0, 20, 40, 0.85) 0%, rgba(0, 10, 20, 0.95) 100%);
        background-size: 15px 15px, 100% 100%;
        
        /* Safe area padding */
        padding-bottom: env(safe-area-inset-bottom, 0);
        
        /* Smooth transitions for glow effects */
        transition: box-shadow 0.2s ease !important;
    }
    
    /* Mobile track - disable pointer events on children */
    .silhouette-panel.panel-mobile .silhouette-track {
        display: flex;
        flex-direction: row;
        width: max-content;
        height: 100%;
        padding: 6px;
        will-change: transform;
        pointer-events: none !important;
    }
    
    /* Mobile silhouette images - fixed size squares */
    .silhouette-panel.panel-mobile .silhouette-img {
        width: 62px;
        height: 62px;
        flex-shrink: 0;
        padding: 4px;
        opacity: 0.4;
        filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(0, 212, 255, 0.3)) !important;
        pointer-events: none !important;
        -webkit-user-drag: none;
    }
    
    /* Mobile vignette - left/right fade */
    .silhouette-panel.panel-mobile::before,
    .silhouette-panel.panel-mobile::after {
        top: 0;
        bottom: 0;
        height: auto;
        width: 20%;
    }
    
    .silhouette-panel.panel-mobile::before {
        left: 0;
        right: auto;
        background: linear-gradient(90deg, rgba(0, 10, 20, 0.95) 0%, transparent 100%);
        border-radius: 12px 0 0 0;
    }
    
    .silhouette-panel.panel-mobile::after {
        right: 0;
        left: auto;
        background: linear-gradient(-90deg, rgba(0, 10, 20, 0.95) 0%, transparent 100%);
        border-radius: 0 12px 0 0;
    }
    
    /* Portal adjustments for mobile with bottom panel */
    .home-portal {
        padding-bottom: 80px !important; /* Space for mobile panel */
        padding-top: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        pointer-events: auto;
        justify-content: flex-start !important; /* Align to top */
    }
    
    /* Auth corner - positioned at very top on mobile */
    .home-auth-corner {
        top: 2px;
        right: 6px;
    }
    
    .portal-logo-section {
        margin-top: 20px; /* Below auth buttons */
        margin-bottom: 6px;
        gap: 2px;
    }
    
    /* Logo and tagline use clamp() for smooth scaling - no fixed overrides needed */
    
    .portal-subtitle {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    
    .portal-description {
        font-size: 0.7rem;
        max-width: 90%;
        line-height: 1.2;
        margin-top: 4px;
    }
    
    .portal-nav {
        gap: 6px;
        max-width: calc(100vw - 20px);
        margin-bottom: 8px;
    }
    
    .portal-nav-btn {
        padding: 12px 10px;
        gap: 8px;
    }
    
    .portal-nav-btn .btn-icon {
        font-size: 1rem;
    }
    
    .portal-nav-btn .btn-label {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .portal-nav-btn .btn-chevron {
        display: none;
    }
    
    .portal-tournament-btn {
        padding: 12px 16px;
        max-width: calc(100vw - 20px);
    }
    
    .portal-tournament-btn .btn-label {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .portal-tournament-btn .btn-chevron {
        display: none;
    }
    
    .home-auth-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Home profile link - allow full width on mobile (centered) */
    .home-profile-link {
        padding: 8px 14px 8px 8px;
        gap: 10px;
        width: auto;
        max-width: none;
    }
    
    .home-profile-avatar {
        width: 32px;
        height: 32px;
    }
    
    .home-profile-avatar::before,
    .home-profile-avatar::after {
        width: 5px;
        height: 5px;
    }
    
    .home-profile-name {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
        max-width: none;
        overflow: visible;
    }
    
    .home-profile-arrow {
        font-size: 0.55rem;
    }
    
    /* Footer - fixed at very bottom */
    .portal-footer {
        position: fixed !important;
        bottom: 10px !important; /* At the very bottom */
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        gap: 12px;
        z-index: 20;
        background: transparent;
    }
    
    .portal-footer-link {
        font-size: 0.65rem;
    }
}

/* Extra small screens (320px) */
@media (max-width: 360px) {
    /* Tagline uses clamp() - no fixed override needed */
    
    .portal-description {
        font-size: 0.7rem;
    }
    
    .portal-nav-btn {
        padding: 12px 8px;
    }
    
    .portal-nav-btn .btn-label {
        font-size: 0.8rem;
    }
    
    .portal-tournament-btn {
        padding: 10px 12px;
    }
    
    .portal-tournament-btn .btn-label {
        font-size: 0.9rem;
    }
    
    .silhouette-panel.panel-mobile {
        height: 70px !important;
        bottom: 30px !important;
        left: 5px !important;
        right: 5px !important;
    }
    
    .silhouette-panel.panel-mobile .silhouette-img {
        width: 58px;
        height: 58px;
        filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(0, 212, 255, 0.3)) !important;
    }
    
    .home-portal {
        padding-bottom: 85px !important;
    }
}

/* Short screens */
@media (max-height: 700px) {
    .portal-logo-section {
        margin-bottom: 12px;
    }
    
    /* Use vh for short screens to scale with available height */
    .portal-logo-frame {
        width: clamp(45px, 8vh, 80px);
        height: clamp(45px, 8vh, 80px);
    }
    
    .portal-tagline {
        font-size: clamp(1.2rem, 2.5vh, 1.8rem);
    }
    
    .portal-description {
        font-size: 0.8rem;
        margin-top: 4px;
    }
    
    .portal-nav {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .portal-nav-btn {
        padding: 16px 18px;
    }
    
    .portal-tournament-btn {
        padding: 14px 24px;
        margin-bottom: 12px;
    }
}

/* Very short screens */
@media (max-height: 600px) {
    .portal-logo-frame {
        width: clamp(40px, 7vh, 60px);
        height: clamp(40px, 7vh, 60px);
    }
    
    .portal-tagline {
        font-size: clamp(1rem, 2vh, 1.4rem);
    }
    
    .portal-subtitle,
    .portal-description {
        display: none;
    }
    
    .portal-nav-btn {
        padding: 12px 14px;
    }
    
    .portal-tournament-btn {
        padding: 12px 20px;
    }
}

/* Combined: mobile + short screen */
@media (max-width: 600px) and (max-height: 700px) {
    .portal-logo-section {
        margin-bottom: 8px;
    }
    
    .portal-logo-frame {
        width: clamp(40px, min(8vw, 7vh), 55px);
        height: clamp(40px, min(8vw, 7vh), 55px);
    }
    
    .portal-tagline {
        font-size: clamp(1rem, min(2.5vw, 2vh), 1.3rem);
    }
    
    .portal-description {
        display: none;
    }
    
    .portal-nav {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .portal-nav-btn {
        padding: 10px 8px;
    }
    
    .portal-tournament-btn {
        padding: 10px 14px;
        margin-bottom: 10px;
    }
}
