/* Global styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}
body {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    max-width: 100vw;
}
* {
    box-sizing: border-box;
}

/* Custom typography for titles */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Mobile: ~40px, Tablet: ~4.5rem, Desktop: ~64px */
}
.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem); /* Mobile: ~32px, Tablet: ~2.2rem, Desktop: ~40px */
}
.site-title {
    font-size: clamp(1.5rem, 4vw, 1.875rem); /* Mobile: ~24px, Tablet: ~1.8rem, Desktop: ~30px */
}

/* Navigation */
header {
    position: relative;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 40;
    background-color: #1a202c; /* Ensure header background is consistent */
    transition: all 0.3s ease-in-out;
}
header.scrolled {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
}
/* Ensure header is visible on mobile */
@media (max-width: 767px) {
    header {
        position: relative;
    }
    header.scrolled {
        position: fixed !important;
        top: 0 !important;
    }
}
.nav-link {
    position: relative;
    padding-bottom: 0.25rem;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #FBBF24; /* yellow-400 */
    transition: width 0.3s ease-in-out;
}
.nav-link:hover::after {
    width: 100%;
}
.play-now-btn, .join-button, .complete-button, .prominent-button {
    text-decoration: none !important;
}

/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Game Card Preloader */
.game-card .game-preloader {
    transition: opacity 0.3s ease-in-out;
}

/* Testimonial Carousel */
.testimonial-carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
}
.testimonial-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.testimonial-wrapper {
    display: flex;
    will-change: transform;
}
.testimonial-card {
    flex-shrink: 0;
    box-sizing: border-box;
}
/* Testimonial dots indicator */
.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.testimonial-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #4B5563; /* gray-600 */
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}
.testimonial-dot:hover {
    background-color: #6B7280; /* gray-500 */
    transform: scale(1.2);
}
.testimonial-dot.bg-yellow-500 {
    background-color: #EAB308; /* yellow-500 */
    width: 2rem;
    border-radius: 9999px;
}

/* FAQ Accordion */
.faq-question {
    cursor: pointer;
    border-bottom: 1px solid #4A5568; /* gray-700 */
}
.faq-question:hover {
    background-color: #2D3748; /* gray-800 */
}
.faq-question .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.faq-question.active .fa-chevron-down {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
    padding: 0;
}
.faq-answer.active {
    max-height: 500px; /* Adjust as needed for content */
    padding: 1.25rem 1.25rem 1.25rem 1.25rem;
}
.faq-answer.hidden {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

/* Mobile menu specific styles */
#mobileMenu {
    transition: all 0.3s ease-in-out;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 30;
}
/* Prevent horizontal scroll on mobile */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    body {
        overflow-x: hidden;
    }
    main {
        overflow-x: hidden;
    }
}

/* Game Modal specific styles */
#gameModal {
    overflow-y: auto; /* Enable scroll if content exceeds height */
}
#gameModal iframe {
    width: 100%;
    height: 100%;
}
#closeGameModalBtn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    background: rgba(0,0,0,0.5); /* Semi-transparent background for better visibility */
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fixed disclaimer header adjustment */
.fixed-header-padding {
    padding-top: 3.5rem; /* Height of the 18+ disclaimer + header */
}

/* Age disclaimer header */
#ageDisclaimerHeader {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
    position: relative;
    width: 100%;
    z-index: 50;
    overflow: hidden;
}
#ageDisclaimerHeader.hidden {
    transform: translateY(-100%);
    opacity: 0;
    max-height: 0;
    padding: 0;
    pointer-events: none;
}

/* Body padding for fixed header */
body {
    padding-top: 0;
}
body.header-fixed {
    padding-top: 4rem; /* Header height when fixed */
}

/* Responsive adjustments for site title */
@media (max-width: 767px) {
    .site-title {
        font-size: 1rem !important; /* ~20px for mobile */
    }
    .hero-title {
        font-size: 2rem; /* ~32px for mobile */
    }
    .section-title {
        font-size: 1.5rem; /* ~24px for mobile */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .site-title {
        font-size: 1.8rem; /* ~28px for tablet */
    }
    .hero-title {
        font-size: 3.5rem; /* ~56px for tablet */
    }
    .section-title {
        font-size: 2.2rem; /* ~35px for tablet */
    }
}

@media (min-width: 1024px) {
    .site-title {
        font-size: 1.875rem; /* ~30px for desktop */
    }
    .hero-title {
        font-size: 4rem; /* ~64px for desktop */
    }
    .section-title {
        font-size: 2.5rem; /* ~40px for desktop */
    }
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #EF4444; /* red-500 */
}
input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #10B981; /* green-500 */
}
/* Styles for the main content box */
.termsCaveBox {
    margin-top: 30px; /* External top spacing for the box */
    padding: 30px 20px; /* Internal padding: top/bottom 30px, left/right 20px */
    /* You might want to add a background color, border, or box-shadow here */
    /* background-color: #f9f9f9; */
    /* border: 1px solid #eee; */
    /* border-radius: 8px; */
}

/* Heading styles */
.termsCaveBox h1 {
    font-size: 26px; /* Relatively small for h1 as requested */
    font-weight: 700; /* Bolder for primary heading */
    line-height: 1.2;
    margin-top: 30px; /* Spacing above the heading */
    margin-bottom: 15px; /* Spacing below the heading */
}

.termsCaveBox h2 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 25px;
    margin-bottom: 12px;
}

.termsCaveBox h3 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 20px;
    margin-bottom: 10px;
}

.termsCaveBox h4 {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 18px;
    margin-bottom: 8px;
}

.termsCaveBox h5 {
    font-size: 16px; /* Similar to body text, but still a heading */
    font-weight: 500;
    line-height: 1.6;
    margin-top: 15px;
    margin-bottom: 6px;
}

/* Paragraph styles */
.termsCaveBox p {
    font-size: 16px; /* Standard body text size */
    line-height: 1.6; /* Good readability */
    margin-bottom: 1em; /* Spacing between paragraphs */
}

/* Unordered list styles */
.termsCaveBox ul {
    list-style-type: disc; /* Default bullet style */
    margin-top: 1em; /* Spacing above the list */
    margin-bottom: 1em; /* Spacing below the list */
    padding-left: 25px; /* Indentation for bullet points */
}

/* List item styles */
.termsCaveBox li {
    font-size: 16px; /* Match body text size */
    line-height: 1.6; /* Good readability */
    margin-bottom: 0.5em; /* Spacing between list items */
}
