/* Base styles for all pages - background image defined here to avoid reloading */
:root{
    --cream: #fff6ea;
    --light-cream: #fff8ef;
    --orange: #ff8a4b;
    --deep-orange: #ff6b2f;
    --muted: #6b4b3b;
    --card-shadow: 0 8px 30px rgba(107,75,59,0.08);
    --radius: 14px;
    --premium-gold: #D4AF37;
    --navy: #0f1f54;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

*{box-sizing:border-box}
body{
    margin:0;
    min-height:100vh;
    color:var(--muted);
    font-family:inherit;
    -webkit-font-smoothing:antialiased;
    position:relative;
}

/* Fixed background image applied to body - will not reload on page navigation */
body::before{
    content:"";
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background-image: url('https://images.wallpapersden.com/image/download/firewatch-new-hd-22-art_bWpubm2UmZqaraWkpJRnamtlrWZpaWU.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index:-2;
    will-change: transform;
    /* Force GPU acceleration to improve performance */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Smooth transition when switching themes */
    transition: opacity 0.5s ease-in-out;
    -webkit-transition: opacity 0.5s ease-in-out;
}

/* Overlay to soften the background */
body::after{
    content:"";
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background: transparent;
    z-index:-1;
    pointer-events:none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Background wrapper class used by base.html */
.app-bg{
    position:relative;
    min-height:100vh;
    padding-top: 70px; /* Space for fixed navbar */
    z-index: 1;
}

/* Mobile optimization - remove attachment fixed for better mobile performance */
@media (max-width: 768px) {
    body::before {
        /* On mobile, use absolute instead of fixed to prevent repaints */
        position: absolute;
        height: 100%;
        min-height: 100vh;
    }
    body::after {
        position: absolute;
        height: 100%;
        min-height: 100vh;
    }
}

/* Remove blue tap highlight and outline on tap for better mobile UX */
button, a, .logout-btn {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Cute rounded navbar branding */
.brand-navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 10px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 
                0 2px 8px rgba(212, 175, 55, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    opacity: 1;
    visibility: visible;
}

/* Hidden state when scrolling down */
.brand-navbar.navbar-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
}

.brand-navbar:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 49, 83, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 
                0 4px 12px rgba(0, 49, 83, 0.15);
    transform: translateX(-50%) translateY(-2px);
}

.brand-navbar .brand-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-navbar .brand-logo {
    width: 100px;
    height: 20px;
    object-fit: contain;
    transform: scale(5.8);
}


.brand-navbar .brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #003153;
    text-shadow: 0 2px 8px rgba(0, 49, 83, 0.2);
    white-space: nowrap;
}

.brand-navbar .brand-dot {
    width: 6px;
    height: 6px;
    background: #003153;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 49, 83, 0.5);
}

/* Responsive navbar */
@media (max-width: 768px) {
    .brand-navbar {
        top: 16px;
        padding: 8px 20px;
    }
    
    .brand-navbar .brand-logo {
        width: 24px;
        height: 24px;
        transform: scale(1.8);
    }
    
    .brand-navbar:hover .brand-logo {
        transform: scale(1.9) rotate(5deg);
    }
    
    .brand-navbar .brand-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .brand-navbar {
        top: 12px;
        padding: 7px 16px;
    }
    
    .brand-navbar .brand-logo {
        width: 80px;
        height: 20px;
        transform: scale(3.5);
    }
    
    .brand-navbar:hover .brand-logo {
        transform: scale(1.9) rotate(5deg);
    }
    
    .brand-navbar .brand-name {
        font-size: 14px;
        letter-spacing: -0.3px;
    }
    
    .brand-navbar .brand-dot {
        width: 5px;
        height: 5px;
    }
}
