/* Navigation */
.main-nav {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

@media (max-width: 767px) {
    .main-nav {
        padding: 1.25rem 1rem;
    }

    .nav-container {
        gap: 1.25rem !important;
    }

    .nav-links {
        font-size: 0.8rem;
        gap: 1rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: white;
    text-transform: uppercase;
}

.nav-brand span {
    color: var(--accent);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

/* Modals */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* Inputs */
.input-range {
    -webkit-appearance: none;
    width: 100%;
    width: -moz-available;
    width: -webkit-fill-available;
    appearance: none;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    outline: none;
}

.input-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.input-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 
   AD BANNER RESPONSIVE LOGIC 
   Mobile/Tablet (< 1280px): Top-of-page Banner (No Legs, No Lights)
   Desktop (>= 1280px): Bottom-Right Billboard (Legs, Lights, Fixed)
*/

.ad-banner-sticky {
    /* Default / Mobile: Mini Billboard Mode */
    position: fixed;
    bottom: 0.5rem;
    right: 1rem;
    width: min(90%, 340px);
    z-index: 50;
    background: transparent;
    pointer-events: none;
}

/* Ensure container allows pointer events */
.ad-banner-sticky .billboard-container {
    pointer-events: auto;
    width: 100%;
}

.ad-banner-sticky .billboard-lights {
    display: flex;
    /* Show lights even on mobile for billboard look */
}

.ad-banner-sticky .billboard-frame {
    /* Billboard frame for mobile */
    border-width: 4px;
    border-radius: 0.25rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    border-color: #1e293b;
}

/* Ensure inner content is reasonable height */
.ad-banner-sticky #sticky-ad-content {
    min-height: 60px;
    /* Compact height for mini billboard */
    max-height: 90px;
}

/* DESKTOP BILLBOARD MODE */
@media (min-width: 1280px) {
    .ad-banner-sticky {
        position: fixed;
        bottom: 0;
        right: 2rem;
        width: 320px;
        height: auto;
        border-bottom: none;
        background: transparent;
        pointer-events: none;
        /* Pass clicks on whitespace */

        /* Reset top/left from default layout flow if needed, 
           but since 'fixed' takes it out of flow, just setting position:fixed works. */
        top: auto;
        left: auto;
    }

    .ad-banner-sticky .billboard-lights {
        display: flex;
        /* Restore lights */
    }

    .ad-banner-sticky .billboard-frame {
        /* Restore chunky frame */
        border-width: 6px;
        border-radius: 0.25rem;
        /* rounded */
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    .ad-banner-sticky #sticky-ad-content {
        min-height: 200px;
        /* Restore billboard height */
    }

    .billboard-container {
        pointer-events: auto;
        transform-origin: bottom center;
        animation: slideUp 1s ease-out;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}