html {
    scroll-behavior: smooth;
}

/* CSS Variables for Sweet Bonanza Theme */

:root {
    --primary-color: #ff3385; /* Vibrant Pink / Magenta */
    --primary-hover: #e02068;
    --secondary-color: #9d4edd; /* Deep Purple */
    --secondary-hover: #7b2cbf;
    --accent-color: #ffb703; /* Candy Yellow */
    --accent-hover: #fb8500;
    
    --bg-light: #fff5fa; /* Even lighter pink for better contrast */
    --bg-white: #ffffff;
    --text-dark: #1a0033; 
    --text-gray: #5a189a;
    
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 30px rgba(90, 24, 154, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #10002b;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

ul { list-style: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 51, 133, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 51, 133, 0.4);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff !important;
    transform: translateY(-3px);
}

/* Global Page Transitions & Polish */
.seo-content p {
    margin-bottom: 1.5rem;
}

.faq-item h4:hover {
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

header, main section {
    animation: fadeIn 0.6s ease-out forwards;
}


.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .btn-large {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 51, 133, 0.08);
    padding: 8px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}
.main-nav a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    font-family: var(--font-heading);
    transition: var(--transition);
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}
.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

/* Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropbtn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 10px 0;
}
.dropbtn:hover {
    color: var(--primary-color);
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 220px; /* Slightly wider for the text */
    box-shadow: 0 10px 30px rgba(90, 24, 154, 0.15);
    z-index: 1001;
    border-radius: 16px;
    top: calc(100% + 15px); /* Add some distance from the button */
    left: 50%; /* Center the dropdown slightly */
    transform: translateX(-50%);
    overflow: visible; /* changed from hidden to let the bridge work */
    padding: 10px 0;
}
/* This invisible bridge prevents the mouse from losing focus between the button and the menu */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
}
.dropdown-content a {
    color: var(--text-dark) !important;
    padding: 10px 20px;
    display: block;
    text-align: left;
    font-size: 0.95rem;
}
.dropdown-content a::after {
    display: none; 
}
.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color) !important;
}
.dropdown:hover .dropdown-content {
    display: block;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.logo span { color: var(--secondary-color); }

@media (max-width: 480px) {
    .logo a { font-size: 1.2rem; }
}

/* Hamburger Menu Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1005;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Prevent horizontal scroll globally */
html, body {
    overflow-x: hidden;
}

/* Mobile nav backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1002;
}
.nav-backdrop.active {
    display: block;
}

/* Mobile Media Query */
@media (max-width: 991px) {
    /* Header stays on top of nav overlay so hamburger is always clickable */
    .header {
        z-index: 1010;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1011; /* above header */
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background-color: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1005;
        gap: 35px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* push content below header height */
        padding-top: 70px;
        padding-bottom: 20px;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav a {
        font-size: 1.25rem;
        margin: 5px 0;
    }

    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        display: block;
        text-align: center;
        padding: 0;
        min-width: auto;
    }

    .dropbtn {
        font-size: 1.5rem;
        pointer-events: none; /* Make label static on mobile */
    }

    .dropdown-content a {
        text-align: center;
        font-size: 1.2rem;
    }

    /* Transform hamburger to X */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
}

/* Language selector — desktop */
.language-selector {
    margin-left: 0;
}

.language-selector select {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e0e0e0;
    background-color: var(--bg-white);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.language-selector select:hover {
    border-color: var(--primary-color);
}

/* Language selector — mobile pill (always visible in header) */
@media (max-width: 768px) {
    /* Push language selector and hamburger to the right as a group */
    .language-selector {
        display: flex;
        align-items: center;
        margin-left: auto;  /* pushes everything after logo to the right */
        margin-right: 6px;
    }

    .language-selector select {
        padding: 6px 24px 6px 10px;
        font-size: 0.78rem;
        font-weight: 700;
        border-radius: 50px;
        border: 1.5px solid var(--primary-color);
        background-color: rgba(255,51,133,0.05);
        color: var(--text-dark);
        max-width: 120px;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ff3385' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(255,51,133,0.12);
    }
}

/* mobile-lang inside nav — always hidden (replaced by header selector) */
.mobile-lang {
    display: none !important;
}

/* legacy rule kept for reference only */
.mobile-lang select {
    padding: 12px 24px;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .language-selector select {
        max-width: 100px;
        font-size: 0.72rem;
        padding: 5px 20px 5px 8px;
    }
}

/* Hero Section */
.hero-title {
    font-size: 3.8rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-dark), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .hero-btns .btn {
        width: 100%;
        max-width: 280px;
    }
}
.hero {
    padding: 60px 0;
    background: radial-gradient(circle at top right, rgba(255, 183, 3, 0.2), transparent 50%),
                radial-gradient(circle at bottom left, rgba(157, 78, 221, 0.15), transparent 50%);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-title {
    font-size: 3.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}
.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-btns {
        justify-content: center;
        gap: 10px;
    }
}

.hero-image { flex: 1; }
.hero-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(157, 78, 221, 0.2);
    transform: rotate(2deg);
    transition: var(--transition);
}
.hero-image img:hover { transform: rotate(0deg) scale(1.02); }

/* Casinos List */
.casinos { padding: 60px 0; }
.casinos h2 { font-size: 2.5rem; margin-bottom: 40px; }

.casino-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.casino-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 6px solid var(--primary-color);
}
.casino-card:hover { transform: translateX(5px); box-shadow: 0 12px 40px rgba(90, 24, 154, 0.15); }
.casino-card:nth-child(2) { border-left-color: var(--secondary-color); }
.casino-card:nth-child(3) { border-left-color: var(--accent-color); }

.casino-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    flex: 1;
}

.casino-bonus { flex: 2; }
.casino-bonus h3 { font-size: 1.2rem; margin: 0; color: var(--primary-color); }
.bonus-badge {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 5px;
}

.casino-features { flex: 1.5; }
.casino-features ul li {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--text-gray);
}
.casino-features ul li::before {
    content: '🍬'; 
    position: absolute;
    left: 0;
    font-size: 0.8rem;
}

.casino-cta { flex: 1; text-align: right; }

/* Demo Section */
.demo-section { padding: 80px 0; background-color: var(--text-dark); color: #fff; }
.demo-section h2 { color: #fff; text-align: center; font-size: 2.5rem; margin-bottom: 15px; }
.demo-section p { color: #d8bbff; margin-bottom: 40px; font-size: 1.1rem; }

.iframe-container {
    background: #000;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin: 0 auto;
    max-width: 900px;
    width: 100%;
    height: 550px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 4px solid var(--primary-color);
}

.iframe-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #240046, #5a189a);
    background-image: url('/assets/img/Sweet_Bonanza.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    position: relative;
}

.iframe-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 5, 40, 0.55);
}

.iframe-placeholder > * {
    position: relative;
    z-index: 1;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Comparison Table */
.specs-section { padding: 60px 0; }
.specs-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 40px; }
.table-responsive { overflow-x: auto; }
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}
.comparison-table th, .comparison-table td {
    padding: 18px 25px;
    text-align: center;
    border-bottom: 1px solid #f0e6f5;
}
.comparison-table th {
    background-color: var(--secondary-color);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}
.comparison-table th:first-child, .comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background-color: var(--bg-light); }

/* SEO Content */
.seo-content { padding-top: 40px; padding-bottom: 40px; max-width: 900px; margin: 0 auto; }
.seo-content h2 { font-size: 2.2rem; margin-top: 40px; color: var(--secondary-color); }
.seo-content h3 { font-size: 1.6rem; margin-top: 30px; color: var(--primary-color); }
.seo-content p { margin-bottom: 20px; font-size: 1.05rem; }

/* FAQ Accordion */
.faq-section { padding: 60px 0; background-color: rgba(255, 255, 255, 0.4); }
.faq-section h2 { margin-bottom: 40px; }
.faq-accordion { display: flex; flex-direction: column; gap: 15px; }

.faq-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover { color: var(--primary-color); }
.faq-icon { font-size: 1.5rem; color: var(--primary-color); font-weight: 400; transition: transform 0.3s; }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background-color: var(--bg-white);
}

.faq-item.active .faq-answer {
    max-height: 500px; /* arbitrary large value */
    padding: 0 25px 20px 25px;
}
.faq-item.active .faq-icon { transform: rotate(45deg); }


/* Game Cards Component */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.game-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px rgba(255, 51, 133, 0.15);
}

.game-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.game-card--classic { border-top: 6px solid var(--primary-color); }
.game-card--1000 { border-top: 6px solid var(--secondary-color); }
.game-card--xmas { border-top: 6px solid #00b4d8; }

.game-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.game-card-body h3 {
    margin-bottom: 12px;
}

.game-card-body p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Footer */

.footer {
    background-color: #10002b;
    color: #e0aaff;
    padding: 60px 0 20px;
    margin-top: 60px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand h3 { color: #fff; font-family: var(--font-heading); margin-bottom: 10px; }
.footer-brand p { max-width: 400px; font-size: 0.9rem; }
.footer-links ul { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #e0aaff; font-size: 0.95rem; }
.footer-links a:hover { color: var(--primary-color); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container { flex-direction: column; text-align: center; }
    .hero-btns { justify-content: center; }
    .casino-card { flex-wrap: wrap; justify-content: center; gap: 15px; text-align: center; }
    .casino-logo, .casino-bonus, .casino-features, .casino-cta { flex: 1 1 100%; text-align: center; }
    .casino-features ul li { display: inline-block; padding: 0 10px; margin-bottom: 5px; }
    .casino-features ul li::before { display: none; }
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    padding: 12px 15px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(90, 24, 154, 0.15);
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 51, 133, 0.2);
}

@media (max-width: 768px) {
    .iframe-placeholder { height: 350px; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links ul { justify-content: center; }

    /* Enable Sticky CTA on mobile and prevent overlap */
    body {
        padding-bottom: 75px;
    }
    .mobile-sticky-cta {
        display: flex;
        justify-content: center;
        padding: 10px 20px;
    }
    .mobile-sticky-cta .btn {
        width: 100%;
        font-size: 1.05rem;
        padding: 14px 0;
        max-width: 480px;
        margin: 0;
        text-align: center;
    }

    .hero-content h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-image img { 
        transform: rotate(0deg) !important; 
        max-width: 90% !important; 
        margin: 20px auto 0 !important; 
    }
    .casinos h2 { font-size: 1.8rem; }
    .seo-content h2 { font-size: 1.6rem; }
    .section-title { font-size: 1.8rem; }
}

/* ============================================================
   GDPR Cookie Consent Banner
   ============================================================ */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(16, 0, 43, 0.97);
    color: #fff;
    padding: 16px 20px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.cookie-banner.visible { display: block; }
.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-text {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.5;
    min-width: 200px;
}
.cookie-text a { color: var(--primary-color); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-decline {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 9px 16px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .cookie-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .cookie-actions { width: 100%; justify-content: flex-end; }
}
/* Push sticky CTA up when cookie banner is visible */
body.cookie-visible .mobile-sticky-cta { bottom: var(--cookie-h, 80px); }
