:root {
    --primary-red: #d32f2f;
    --dark-bg: #0b0d17;
    --card-bg: #151a28;
    --card-border: #232a3f;
    --text-muted: #a0a5b5;
    /* A nice deep blue for the mask overlay */
    --overlay-blue: #0a0e29;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: white;
    overflow-x: hidden;
}

.text-center { text-align: center; }
.section-padding { padding: 80px 5%; }

/* Typography */
h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 20px; }
h2 { font-size: 2.2rem; margin-bottom: 15px; }
p { color: var(--text-muted); line-height: 1.6; }

/* Navigation */
.warning-bar { background: var(--primary-red); text-align: center; padding: 10px; font-size: 13px; font-weight: bold; }
header { background: rgba(11, 13, 23, 0.95); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--card-border); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; }
.logo { font-size: 24px; font-weight: bold; }
.nav-links { display: flex; list-style: none; gap: 25px; }
.nav-links a { text-decoration: none; color: var(--text-muted); transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-right a { text-decoration: none; color: white; }
.mobile-menu-toggle { display: none; font-size: 24px; cursor: pointer; }

/* Buttons */
.btn-red { background: var(--primary-red); color: white; padding: 12px 28px; text-decoration: none; border-radius: 6px; font-weight: bold; transition: background 0.3s, transform 0.2s; display: inline-block; border: none; cursor: pointer; }
.btn-red:hover { background: #b71c1c; transform: translateY(-2px); }
.btn-outline { border: 2px solid white; color: white; padding: 10px 28px; text-decoration: none; border-radius: 6px; font-weight: bold; transition: all 0.3s; }
.btn-outline:hover { background: white; color: var(--dark-bg); }

/* =========================================
   HERO SECTION WITH BLUE GRADIENT MASK
   ========================================= */
.hero { 
    position: relative; 
    /* Reduced Desktop Height */
    height: 55vh; 
    min-height: 450px; 
    display: flex; 
    align-items: center; 
    padding: 0 5%; 
    overflow: hidden;
}

.video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* The Video itself */
#hero-video { 
    width: 100%; height: 100%; object-fit: cover; 
    /* Video is relatively bright underneath the mask */
    opacity: 0.8; 
}

/* THE BLUE MASK OVERLAY */
.video-background::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Linear Gradient: 80% opacity left -> 40% opacity right */
    background: linear-gradient(to right, rgba(10, 14, 41, 0.85) 0%, rgba(10, 14, 41, 0.4) 100%);
    z-index: 1; /* Sits on top of video */
}

/* Ensure content sits on top of the mask */
.hero-content { position: relative; z-index: 2; }
.hero-btns { margin-top: 30px; display: flex; gap: 15px; }

/* Bonuses Section */
.bonuses-container { width: 100%; }
.bonuses-track { display: flex; width: 100%; }
.bonus-card { flex: 1; padding: 50px 20px; text-align: center; transition: transform 0.3s; }
.bonus-card:hover { transform: translateY(-10px); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.bonus-card.red { background: #d32f2f; }
.bonus-card.orange { background: #e65100; }
.bonus-card.blue { background: #1976d2; }
.bonus-card span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.bonus-card h2 { margin: 15px 0 25px; font-size: 2.5rem; }
.btn-glass { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.5); color: white; padding: 10px 25px; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.btn-glass:hover { background: white; color: black; }
.clone { display: none; }

/* Grids & General */
.category-grid, .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.cat-card, .feat-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: 40px 30px; border-radius: 12px; transition: transform 0.3s; }
.cat-card:hover { transform: translateY(-5px); border-color: var(--primary-red); }
.icon { font-size: 40px; margin-bottom: 20px; }
.circle-icon { width: 70px; height: 70px; background: #2a1625; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 20px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 40px; }
.game-item { background: var(--purple-grad); border-radius: 10px; overflow: hidden; position: relative; cursor: pointer; transition: transform 0.3s; display: flex; flex-direction: column; height: 250px; }
.game-item:hover { transform: scale(1.03); border: 1px solid var(--primary-red); }
.game-icon { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 60px; }
.game-info { background: var(--card-bg); padding: 15px; border-top: 1px solid var(--card-border); }
footer { background: #05060a; padding: 60px 5% 30px; text-align: center; border-top: 1px solid var(--card-border); }
.social-icons { margin: 30px 0; }
.social-icons a { background: var(--card-bg); border-radius: 50%; width: 45px; height: 45px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; margin: 0 10px; }

/* Animations */
.hidden { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =========================================
   NEW "GLORY EFFECT" CONTACT BOX
   ========================================= */
.contact-glow-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(11, 13, 23, 0.9); /* Dark semi-transparent background */
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    padding: 15px;
    z-index: 1000;
    /* The Glory Effect (Pulsing Red Glow) */
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.6), inset 0 0 10px rgba(211, 47, 47, 0.3);
    animation: gloryPulse 2s infinite ease-in-out;
    backdrop-filter: blur(5px);
}

@keyframes gloryPulse {
    0% { box-shadow: 0 0 15px rgba(211, 47, 47, 0.6), inset 0 0 10px rgba(211, 47, 47, 0.3); }
    50% { box-shadow: 0 0 25px rgba(211, 47, 47, 0.9), inset 0 0 15px rgba(211, 47, 47, 0.5); transform: scale(1.02); }
    100% { box-shadow: 0 0 15px rgba(211, 47, 47, 0.6), inset 0 0 10px rgba(211, 47, 47, 0.3); }
}

.fb-btn {
    display: block;
    background: #1877f2; /* Facebook Blue */
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    transition: background 0.3s;
}
.fb-btn:hover { background: #0e5fc0; }

.text-btn {
    color: white;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* =========================================
   MOBILE RESPONSIVENESS UPDATES
   ========================================= */
@media (max-width: 768px) {
    .nav-links, .nav-right { display: none; }
    .mobile-menu-toggle { display: block; }
    
    /* Reduced Mobile Hero Height */
    .hero { 
        height: 40vh; 
        min-height: 320px; 
        padding: 30px 5%; 
        text-align: center; 
        justify-content: center;
    }
    .hero-content h1 { font-size: 1.8rem; margin-bottom: 10px; }
    .hero-content p { font-size: 0.85rem; margin-bottom: 15px; line-height: 1.3; }
    
    /* UPDATED MOBILE HERO BUTTONS (Side-by-Side) */
    .hero-btns { 
        flex-direction: row; /* Keep them in a row */
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    /* Size them to fit nicely together */
    .hero-btns .btn-red, .hero-btns .btn-outline {
        margin: 0;
        padding: 10px 15px;
        font-size: 0.9rem;
        min-width: 130px; /* Ensures they don't get too squished */
        flex: 1; /* Try to take equal space, up to a point */
        max-width: 180px;
    }

    /* Marquee (Unchanged) */
    .bonuses-container { overflow: hidden; width: 100%; position: relative; }
    .bonuses-track { display: flex; flex-wrap: nowrap; width: max-content; animation: scrollLeft 15s linear infinite; }
    .clone { display: flex; } 
    .bonus-card { min-width: 280px; padding: 40px 20px; }
    @keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

    /* Adjust contact box for mobile */
    .contact-glow-box { bottom: 20px; right: 10px; left: 10px; text-align: center; }
}


/* Image styling for the cards */
.fb-logo-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Hide dots on desktop */
.carousel-dots { display: none; }

/* Modify the card to act as a link properly */
a.cat-card {
    display: block;
    text-decoration: none;
}

/* Image styling for the cards */
.fb-logo-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Hide dots on desktop */
.carousel-dots { display: none; }

/* Modify the card to act as a link properly */
a.cat-card {
    display: block;
    text-decoration: none;
}

/* Mobile Sliding Carousel Styles */
@media (max-width: 768px) {
    .category-carousel-wrapper {
        position: relative;
        width: 100%;
        margin-top: 30px;
    }

    .category-grid.carousel-track {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        /* This enables native smooth swiping on mobile */
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hides scrollbar in Firefox */
        gap: 15px;
        padding-bottom: 10px;
        margin-top: 0;
    }
    
    /* Hides scrollbar in Chrome/Safari */
    .category-grid.carousel-track::-webkit-scrollbar {
        display: none; 
    }

    .cat-card.carousel-slide {
        flex: 0 0 100%; /* Makes each card take up exactly 100% of the screen width */
        scroll-snap-align: center; /* Snaps the card exactly to the center when swiping */
        transform: none !important; /* Prevents hover jump interference */
    }

    /* Reveal and style the dots */
    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 15px;
    }
    
    .dot {
        width: 12px; 
        height: 12px;
        background-color: #444; /* Dark gray for inactive */
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.3s;
    }
    
    .dot.active {
        background-color: var(--primary-red); /* Red dot for active */
    }
}



/* =========================================
   UPDATED OUR GAMES SECTION (Glowing & 3-Column)
   ========================================= */

/* The new radial background for the whole section */
.our-games {
    background: radial-gradient(circle at center, #1a1b3a 0%, #0b0d17 80%);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* New short description styling */
.games-desc {
    max-width: 600px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
    color: #ccc;
}

/* OVERRIDE: The Game Tile (Added Glow Effect) */
.game-item { 
    background: var(--card-bg); 
    border-radius: 12px; 
    overflow: hidden; 
    position: relative; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    height: 260px;
    
    /* Permanent subtle glowing effect */
    border: 1px solid rgba(211, 47, 47, 0.4) !important;
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.25) !important;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s !important;
}

/* OVERRIDE: Intensify glow on hover */
.game-item:hover { 
    transform: translateY(-5px) !important; 
    border-color: var(--primary-red) !important;
    box-shadow: 0 0 25px rgba(211, 47, 47, 0.7) !important;
}

/* Image formatting for the new image tags */
.game-img-wrapper {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.game-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills box perfectly */
    transition: transform 0.5s ease;
}

.game-item:hover .game-img {
    transform: scale(1.1); /* Zoom effect on hover */
}

/* OVERRIDE: Text area formatting */
.game-info { 
    background: var(--dark-bg) !important; 
    padding: 15px !important; 
    border-top: 1px solid rgba(211, 47, 47, 0.3) !important;
    text-align: center;
}
.game-info h4 { font-size: 1.1rem; margin-bottom: 4px; }
.game-info span { font-size: 13px; color: var(--text-muted); }

/* =========================================
   MOBILE OVERRIDES (3-PER-ROW LAYOUT)
   ========================================= */
@media (max-width: 768px) {
    .games-desc {
        font-size: 0.9rem;
        padding: 0 10px;
        margin-bottom: 20px;
    }

    .game-grid {
        /* Forces exactly 3 columns on mobile */
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important; 
        margin-top: 25px !important;
    }

    .game-item {
        height: 150px !important; /* Shorter height so they stay squarish */
        border-radius: 8px !important;
        box-shadow: 0 0 10px rgba(211, 47, 47, 0.3) !important;
    }

    .game-info {
        padding: 8px 4px !important; 
    }

    .game-info h4 {
        font-size: 0.75rem !important; 
        /* Auto-adds '...' if title is too long */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; 
        margin-bottom: 2px;
    }

    .game-info span { font-size: 0.65rem !important; }
}


/* =========================================
   SAFE. FAST. FAIR. MOBILE OVERRIDE (3-Per-Row)
   ========================================= */
@media (max-width: 768px) {
    /* Force the grid into 3 equal columns */
    .feature-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important; 
        margin-top: 25px !important;
    }

    /* Shrink the card padding so it fits the screen */
    .feat-card {
        padding: 15px 5px !important; 
        border-radius: 8px !important;
    }

    /* Shrink the circular icon */
    .circle-icon {
        width: 40px !important; 
        height: 40px !important;
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }

    /* Shrink the titles */
    .feat-card h4 {
        font-size: 0.75rem !important;
        margin-bottom: 5px !important;
        /* Keeps the title on one line if possible */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Shrink the paragraph text drastically so it doesn't stretch the card */
    .feat-card p {
        font-size: 0.65rem !important; 
        line-height: 1.3 !important;
    }
}
/* =========================================
   AGGRESSIVE MOBILE GAP FIX (Eliminates dead space)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Shrink general section padding drastically */
    .section-padding { 
        padding: 20px 5% !important; 
    }
    
    /* 2. Squeeze the gap between Facebook tiles and Games */
    .welcome.section-padding {
        padding-bottom: 0px !important; /* Removes bottom space under FB tiles */
    }
    .our-games.section-padding {
        padding-top: 15px !important; /* Pulls the Games title way up */
        padding-bottom: 15px !important; /* Pulls the bottom up */
    }

    /* 3. Squeeze the gap between "View All Games" and "Safe. Fast. Fair." */
    .features.section-padding {
        padding-top: 10px !important; /* Pulls Safe Fast Fair way up */
    }
    
    /* 4. Tame the hard-coded margin on the View All Games button */
    .our-games .text-center[style] {
        margin-top: 15px !important;
        margin-bottom: 5px !important;
    }
}


/* =========================================
   FAQ / ACCORDION SECTION
   ========================================= */
.faq-section {
    background-color: var(--dark-bg);
}

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: rgba(211, 47, 47, 0.5); /* Slight red border on hover */
}

/* The clickable button */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-red);
    transition: transform 0.3s ease;
}

/* The hidden answer container */
.faq-answer {
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background: rgba(0, 0, 0, 0.2);
}

.faq-answer p {
    padding: 0 20px 20px 20px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Active State Styles (when opened via JS) */
.faq-item.active .faq-question {
    color: var(--primary-red);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg); /* Turns the + into an X */
}

/* Mobile Tweak for FAQ */
@media (max-width: 768px) {
    .faq-question {
        font-size: 0.95rem;
        padding: 15px;
    }
    .faq-icon {
        font-size: 1.2rem;
    }
    .faq-answer p {
        font-size: 0.85rem;
        padding: 0 15px 15px 15px;
    }
}



/* =========================================
   MIDDLE-RIGHT FLOATING MESSENGER PILL
   ========================================= */
.floating-chat-pill {
    position: fixed;
    top: 50%; /* Places it perfectly in the middle vertically */
    right: -5px; /* Hugs the right side of the screen */
    transform: translateY(-50%); /* Adjusts for its own height to be true center */
    background-color: #ff7b00; /* Official Messenger Blue */
    display: flex;
    align-items: center;
    padding: 5px 15px 5px 5px;
    border-radius: 30px 0 0 30px; /* Pill shape on the left side, flat on the right */
    text-decoration: none;
    color: white;
    box-shadow: -2px 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999; /* Ensures it stays on top of all other elements */
    transition: right 0.3s ease, background-color 0.3s;
}

.floating-chat-pill:hover {
    background-color: #ffd900; /* Slightly darker blue on hover */
    right: 0; /* Slides out slightly on hover */
}

/* The white circle background for the Messenger logo */
.chat-icon-circle {
    background-color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Sizing the SVG icon inside the circle */
.chat-icon-circle svg {
    width: 22px;
    height: 22px;
}

/* The "Need Help?" text */
.chat-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* Mobile Responsiveness for the Pill */
@media (max-width: 768px) {
    .floating-chat-pill {
        top: 53% !important;
        padding: 4px 10px 4px 4px;
        right: -3px;
    }
    .chat-icon-circle {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    .chat-icon-circle svg {
        width: 18px;
        height: 18px;
    }
    .chat-text {
        font-size: 12px;
    }
}