/* --- CSS VARIABLES BASED ON YOUR PALETTE --- */
:root {
    --c-orange: #ffa22b;
    --c-red: #fb4d5d;
    --c-yellow: #f9df09;
    --c-black: #000000;
    --c-white: #ffffff;
    --c-light-pink: #ff919f;
    --c-dark-orange: #ff943a;
    
    --font-main: 'Poppins', sans-serif;
    --gradient-main: linear-gradient(135deg, var(--c-red), var(--c-orange), var(--c-yellow));
}

/* --- GLOBAL STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--c-black);
    color: var(--c-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* --- HEADER & NAV --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(0,0,0,0.9);
    border-bottom: 2px solid var(--c-red);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 115px;
    width: auto;
    border-radius: 50%; 
    border: 2px solid var(--c-orange);
}

.logo-text {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo-highlight { color: var(--c-orange); }

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a.active-link {
    color: #fb4d5d !important; /* Your Theme Red */
    text-shadow: 0 0 15px rgba(251, 77, 93, 0.8), 0 0 30px rgba(251, 77, 93, 0.4); /* The Glow */
    border-bottom: 2px solid #fb4d5d; /* Red Underline */
    box-shadow: 0 10px 10px -10px rgba(251, 77, 93, 0.5); /* Glow under the line */
}

/* Optional: Make links glow orange when you hover over them */
nav a:hover {
    color: var(--c-orange);
    text-shadow: 0 0 10px var(--c-orange);
}

/* --- HERO SECTION --- */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: radial-gradient(circle at center, #2a1010 0%, #000000 70%);
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--c-light-pink);
    margin-bottom: 40px;
    max-width: 600px;
}

/* =========================================
   NEW BEAR DEN COUNTER STYLES
   ========================================= */

/* The Label sitting above the den */
.counter-label-above {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--c-light-pink);
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 77, 93, 0.5);
}

/* The outer ring of the den (fiery rocks) */
.bear-den-counter {
    position: relative;
    width: 320px;
    height: 320px;
    margin-bottom: 40px;
    border-radius: 50%; /* Makes it a circle */
    
    /* Complex gradient to create a glowing rock effect */
    background: radial-gradient(circle at center, 
        var(--c-orange) 20%, 
        var(--c-red) 50%, 
        #2a1010 85%
    );
    
    /* Deep outer glow */
    box-shadow: 
        0 0 60px rgba(251, 77, 93, 0.6),
        inset 0 0 30px rgba(0,0,0,0.8);
        
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #2a1010;
}

/* The inner dark opening */
.den-mouth {
    width: 75%;
    height: 75%;
    background-color: #000; /* Deep black interior */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Inner rim glow and depth shadow */
    box-shadow: 
        inset 0 0 50px #000, /* Inner depth */
        0 0 20px var(--c-orange); /* Glowing rim */
    border: 3px solid var(--c-dark-orange);
}

/* The number inside (making it glow hotter) */
.counter-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--c-yellow);
    font-variant-numeric: tabular-nums;
    
    /* Intense text glow to look like fire */
    text-shadow: 
        0 0 20px var(--c-yellow), 
        0 0 40px var(--c-orange),
        0 0 60px var(--c-red);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .bear-den-counter {
        width: 250px;
        height: 250px;
    }
    .counter-value { font-size: 2.8rem; }
}

/* --- MISSION SECTION --- */
.mission {
    padding: 80px 10%;
    background-color: #0a0a0a;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.mission-content {
    flex: 1;
    min-width: 300px;
}

.mission-visual {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.large-logo {
    max-width: 100%;
    width: 400px;
    border-radius: 30%;
    box-shadow: 0 0 50px rgba(255, 162, 43, 0.15);
    transition: transform 0.5s ease;
}

.large-logo:hover {
    transform: scale(1.02);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--c-white);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--c-red);
}

.mission-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #cccccc;
}

.highlight-name {
    color: var(--c-orange);
    font-weight: 700;
}

/* --- CTA BUTTON --- */
.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gradient-main);
    color: var(--c-black);
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(251, 77, 93, 0.4);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--c-black);
    border-top: 1px solid #222;
    color: #666;
    font-size: 0.9rem;
}

footer span {
    color: var(--c-light-pink);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .counter-value { font-size: 2.5rem; }
    .mission { flex-direction: column-reverse; padding: 60px 5%; }
    nav { display: none; /* Hidden for simplicity in this demo */ }
}

/* =========================================
   GALLERY PAGE STYLES (Add to bottom of styles.css)
   ========================================= */

.gallery-section {
    padding: 60px 5%;
    background-color: #0f0f0f;
}

.gallery-grid {
    display: grid;
    /* This creates a responsive grid that fits as many columns as possible */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #000;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* Hover Effects */
.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--c-orange);
    box-shadow: 0 10px 30px rgba(255, 162, 43, 0.2);
    z-index: 10;
}

/* Caption Styling */
.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--c-white);
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0; /* Hidden by default */
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Show caption on hover */
.gallery-item:hover .caption {
    opacity: 1;
    transform: translateY(0);
}

/* Active Navigation State Style */
nav a.active-link {
    color: var(--c-orange);
    border-bottom: 2px solid var(--c-orange);
}

/* =========================================
   MODAL / POPUP STYLES
   ========================================= */

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; /* Sits on top */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.85); /* Black w/ opacity */
    backdrop-filter: blur(5px); /* Blurs the background */
    animation: fadeIn 0.3s;
}

/* Modal Content Box - FIXED SIZE 400x400 */
.modal-content {
    background-color: #111;
    margin: 10% auto; /* Centered vertically/horizontally */
    
    /* --- NEW DIMENSIONS --- */
    width: 400px;
    height: 400px;
    
    /* Flexbox to center everything perfectly inside the square */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    padding: 20px; /* Reduced padding slightly to fit everything */
    border: 2px solid var(--c-orange);
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(255, 162, 43, 0.4);
    position: relative;
    animation: slideDown 0.4s;
}

/* Modal Text Adjustments for the fixed box */
.modal-content h2 {
    color: var(--c-white);
    margin-bottom: 5px; /* Reduced margin */
    font-size: 1.5rem;
    text-transform: uppercase;
}

.modal-content p {
    color: var(--c-light-pink);
    margin-bottom: 15px; /* Reduced margin */
}

/* QR Image - slightly adjusted to fit the 400px height comfortably */
.qr-img {
    width: 180px;  /* Slightly smaller to ensure fit */
    height: 180px;
    border-radius: 10px;
    border: 4px solid var(--c-white);
    margin-bottom: 15px;
}

/* Ensure the close button stays in the corner */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.modal-footer {
    font-size: 0.9rem;
    color: #666 !important;
    margin-bottom: 0 !important;
}

/* Animations */
@keyframes fadeIn {
    from {opacity: 0} 
    to {opacity: 1}
}

@keyframes slideDown {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* =========================================
   STATUS HUB (TIER + SOCIAL SIGNALS)
   ========================================= */

.status-hub {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Space between icons and Tier text */
}

/* --- Social Signals Row --- */
.social-signals {
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #333;
}

.signal-link {
    position: relative;
    color: #555; /* Default "Offline" color */
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Kick Custom Icon Style */
.kick-icon {
    font-weight: 900;
    font-family: sans-serif;
    font-size: 1rem;
    margin-top: 2px; /* Visual alignment */
}

/* Hover Effects */
.signal-link:hover { color: var(--c-white); transform: scale(1.1); }
.signal-link.twitch:hover { color: #9146FF; }
.signal-link.kick:hover { color: #53FC18; }
.signal-link.youtube:hover { color: #FF0000; }

/* --- THE "IS LIVE" STATE --- */
/* Add class="is-live" to the HTML tag to turn these on */

.signal-link.is-live {
    color: var(--c-white);
    text-shadow: 0 0 10px currentColor; /* Glow effect */
}

/* Specific colors when live */
.signal-link.twitch.is-live { color: #9146FF; }
.signal-link.kick.is-live { color: #53FC18; }
.signal-link.youtube.is-live { color: #FF0000; }

/* The Glowing Dot */
.live-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 6px;
    height: 6px;
    background-color: transparent; /* Invisible by default */
    border-radius: 50%;
}

/* Dot turns red/active only when parent is .is-live */
.signal-link.is-live .live-dot {
    background-color: #ff0000;
    box-shadow: 0 0 5px #ff0000;
    animation: blinkLive 1.5s infinite;
}

/* --- Tier Badge Styling --- */
.tier-display {
    text-align: center;
    line-height: 1;
}

.tier-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--c-light-pink);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.tier-value {
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(255, 162, 43, 0.3));
}

/* Animation for the Live Dot */
@keyframes blinkLive {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
    100% { opacity: 1; transform: scale(1); }
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .tier-value { font-size: 1.1rem; }
    .social-signals { padding: 4px 10px; gap: 10px; }
    .signal-link { font-size: 1rem; }
}

/* =========================================
   SMART MOBILE SETTINGS (Fluid & Adaptive)
   ========================================= */

/* Default: Hide Hamburger on Desktop */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--c-white);
    cursor: pointer;
    z-index: 200; /* Ensure it stays on top of everything */
}

/* --- TABLET & MOBILE (Under 1024px) --- */
@media (max-width: 1024px) {
    header {
        padding: 10px 5%; /* Reduce padding to save space */
    }
    
    .logo-text { font-size: 1.2rem; } /* Slightly smaller logo text */
}

/* --- PHONES (Under 768px) --- */
@media (max-width: 768px) {
    header {
        display: flex;
        flex-wrap: wrap; /* Allow items to wrap to next line if needed */
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        position: relative;
    }

    /* 1. Hamburger Button Position */
    .menu-toggle {
        display: block;
        order: 3; /* Force it to the far right */
    }

    /* 2. Logo Adjustments */
    .logo-container {
        order: 1; /* Force to far left */
        flex-grow: 1; /* Allow it to take available space */
    }
    .logo-img { height: 45px; width: 45px; }
    .logo-text { font-size: 1rem; }

    /* 3. Status Hub (Icons + Tier) */
    .status-hub {
        order: 2; /* Sits between logo and menu, or wraps below */
        display: flex;
        flex-direction: row; /* Horizontal on mobile to save vertical space */
        align-items: center;
        gap: 15px;
        transform-origin: right center; /* Scale from the right */
        
        /* HIDE on very small screens if it breaks layout, 
           or move to row 2 (see next media query) */
    }
    
    .tier-display {
        display: none; /* Hide Tier text on mobile to save space, keep icons */
    }

    /* 4. The Mobile Dropdown Menu */
    nav.nav-menu {
        display: none;
        width: 100%;
        order: 4; /* Force to bottom of header */
        background-color: #000;
        border-top: 1px solid #333;
        margin-top: 10px;
    }

    nav.nav-menu.active { display: block; }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    nav li { width: 100%; text-align: center; }
    
    nav a {
        padding: 15px;
        border-bottom: 1px solid #1a1a1a;
        font-size: 1.1rem;
        display: block; /* Make whole area clickable */
    }
    
    /* Adjust Hero Text for Phones */
    .hero h1 { font-size: clamp(2rem, 8vw, 3rem); } /* Fluid font size */
    .counter-value { font-size: clamp(2rem, 10vw, 3rem); }
}

/* --- SMALL PHONES (Under 480px) --- */
@media (max-width: 480px) {
    /* On tiny screens, move Status Hub to a second row so Logo + Menu fit */
    .status-hub {
        order: 4; /* Move below everything else */
        width: 100%;
        justify-content: center;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    /* Ensure Menu is below the new Status Hub row */
    nav.nav-menu { order: 5; }

    /* Hide the text "Bear Den Initiative" if screen is REALLY small, keep logo */
    .logo-text {
        display: none; 
    }
    
    /* Show Tier badge again since we moved it to its own row */
    .tier-display { display: block; }
}

/* Disclaimer Modal Specifics */
.disclaimer-content {
    max-width: 500px;
    text-align: center;
    border: 2px solid #eebb4d; /* Matches your brand gold/orange */
    box-shadow: 0 0 20px rgba(238, 187, 77, 0.2);
}

.disclaimer-content h2 {
    color: #eebb4d;
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-transform: uppercase;
}

.disclaimer-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #ddd;
}

.disclaimer-content .fa-paw {
    margin-right: 10px;
}

/* Ensure the modal sits on top of everything */
#app-disclaimer-modal {
    z-index: 9999;
    background-color: rgba(0,0,0,0.9); /* Darker overlay for focus */
}

/* Launch Modal - Full Screen Overlay */
.launch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000; /* pure black for cinematic feel */
    z-index: 10000; /* Highest priority */
    display: flex; /* Hidden by default via JS, but flex for centering */
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.launch-content {
    width: 90%;
    max-width: 800px;
    text-align: center;
    background: #111;
    padding: 20px;
    border: 1px solid #eebb4d;
    box-shadow: 0 0 50px rgba(238, 187, 77, 0.3);
    border-radius: 10px;
}

.video-wrapper {
    margin-bottom: 20px;
    border: 1px solid #333;
}

.launch-actions {
    margin-top: 15px;
}

/* Hide class for JS to toggle */
.launch-hidden {
    display: none !important;
}


/* --- SPOTLIGHT SCROLLER --- */
.spotlight-container {
    padding: 40px 20px;
    background: #111;
    overflow: hidden; /* Hides scrollbar roughly */
}

.scrolling-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* smooth scroll on mobile */
}

/* Custom Scrollbar for the gallery */
.scrolling-wrapper::-webkit-scrollbar {
    height: 8px;
}
.scrolling-wrapper::-webkit-scrollbar-track {
    background: #222; 
}
.scrolling-wrapper::-webkit-scrollbar-thumb {
    background: #eebb4d; 
    border-radius: 4px;
}

.spotlight-card {
    min-width: 300px;
    height: 200px;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.spotlight-card:hover {
    transform: scale(1.03);
    border-color: #eebb4d;
}

.spotlight-card img, .spotlight-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.spotlight-card:hover img, .spotlight-card:hover video {
    opacity: 1;
}

/* Play Icon Overlay for Video Thumbnails */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
    pointer-events: none;
}

.card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
}

/* --- LIGHTBOX MODAL --- */
.spotlight-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
}

.spotlight-content-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

#media-display-area {
    width: 100%;
    max-height: 80vh;
    display: flex;
    justify-content: center;
}

#media-display-area img, #media-display-area video {
    max-width: 100%;
    max-height: 80vh;
    border: 2px solid #eebb4d;
    box-shadow: 0 0 30px rgba(238, 187, 77, 0.2);
}

.slide-nav {
    background: none;
    border: none;
    color: #eebb4d;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 10px;
}

.slide-nav:hover {
    color: #fff;
}

.close-spotlight {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #ddd;
    font-size: 1.2rem;
}

/* =========================================
   LIVE STATUS INDICATORS (Required for Red Dot)
   ========================================= */
.signal-link {
    position: relative;
    transition: 0.3s;
}

/* Default State (Hidden) */
.live-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 6px;
    height: 6px;
    background-color: transparent;
    border-radius: 50%;
    transition: 0.3s;
}

/* LIVE STATE: Show Red Dot & Blink */
.signal-link.is-live .live-dot {
    background-color: #ff0000;
    box-shadow: 0 0 5px #ff0000;
    animation: blinkLive 1.5s infinite;
}

/* Icon Colors when Live */
.signal-link.twitch.is-live { color: #9146FF !important; }
.signal-link.kick.is-live { color: #53FC18 !important; }
.signal-link.youtube.is-live { color: #FF0000 !important; }

/* Blinking Animation */
@keyframes blinkLive {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
    100% { opacity: 1; transform: scale(1); }
}