:root {
    --primary: #0891B2;
    --primary-dark: #0E7490;
    --accent: #06B6D4;
    --light: #E0F2FE;
    --dark: #0C4A6E;
    --bg: #F0F9FF;
    --text: #164E63;
    --text-light: #E0F2FE;
    --card-bg: #FFFFFF;
    --border: #BAE6FD;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    display: flex;
    align-items: center; /* ensure contents are vertically centered */
    background-color: var(--card-bg);
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.1);
    /* give a consistent min height so logos aren't clipped */
    min-height: 64px;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
    max-height: 48px;
    width: auto;
    display: block; /* prevent inline-image clipping */
}

.logo-link {
    display: flex;
    align-items: center; /* vertically center the image within the link */
}

.nav-links {
    display: flex;
    gap: 2rem;
}

/* Dropdown in navbar */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.1);
    padding: 0.5rem 0;
    display: none;
    min-width: 160px;
    z-index: 2000;
}

.dropdown-menu a {
    display: block;
    /* keep vertical padding, add a little extra left padding so submenu is indented visually */
    padding: 0.5rem 1rem 0.5rem 1.5rem; /* top right bottom left */
    color: var(--text);
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--light);
}

.nav-item.dropdown.show .dropdown-menu {
    display: block;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

/* Make dropdown toggle look like a nav link */
.nav-links .dropdown-toggle {
    appearance: none;
    background: none;
    border: none;
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-links .dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-item.dropdown.show > .dropdown-toggle::after,
.nav-links .dropdown-toggle:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background-color: var(--light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    /* soft color wash to preserve previous look */
    background: linear-gradient(135deg, rgba(8,145,178,0.08) 0%, rgba(14,116,144,0.06) 100%);
    z-index: 1;
}

/* subtle texture layer: dots + soft waves using gradients (no extra images) */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-image:
        /* tiny dots */
        radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
        /* faint diagonal stripes for depth */
        linear-gradient(135deg, rgba(255,255,255,0.02) 0 10%, transparent 10% 20%);
    background-size: 18px 18px, 34px 34px, 600px 600px;
    mix-blend-mode: overlay;
    filter: blur(0.2px) saturate(0.95);
    opacity: 0.9;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.2);
}

/* About Section */
.about {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    align-items: center;
}

.about-content {
    color: var(--text);
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(8, 145, 178, 0.15);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text);
    opacity: 0.9;
}

/* Games Section (cards + responsive iframes) */
.games {
    padding: 6rem 0;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-heading.centered { margin-bottom: .25rem; }
.section-subtitle { color: var(--text); opacity: .85; }

.games-grid {
    display: grid;
    grid-template-columns: 1fr; /* single column stack */
    gap: 2rem;
    max-width: 900px; /* center column width */
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Responsive game frame: max-width 900px, 16:9 aspect ratio */
.game-wrapper {
    max-width: 900px;
    width: 100%;
    margin: 0 auto; /* center */
    position: relative;
    aspect-ratio: 16 / 9; /* modern browsers */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    background: #000; /* fallback while iframe loads */
}

/* Disclaimer shown above games */
.game-disclaimer {
    background: linear-gradient(90deg, rgba(30,58,95,0.06), rgba(74,144,184,0.03));
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 0 0 1rem 0;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

.game-disclaimer strong { color: var(--primary); margin-right: 0.5rem; }
.game-disclaimer a { display: inline-block; margin-left: 0.5rem; color: var(--accent); text-decoration: none; }
.game-disclaimer a:hover { text-decoration: underline; }

.game-wrapper iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16/9) {
    .game-wrapper { height: 0; padding-top: 56.25%; }
    .game-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}

/* Card layout */
.game-card { display: block; background: var(--card-bg); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.06); }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(8,145,178,0.12); }
.game-content { padding: 1rem 1.25rem 1.5rem; }
.game-content h3 { margin: 0 0 .5rem; color: var(--dark); }
.game-content p { margin: 0; color: var(--text); opacity: .9; }

@media (max-width: 480px) {
    .games { padding: 3rem 0; }
    .game-content { padding: 1rem; }
}

/* Reviews Section */
.reviews {
    padding: 6rem 0;
    background-color: var(--light);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.1);
}

.review-rating {
    color: var(--accent);
    margin-bottom: 1rem;
}

.review-text {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.review-author {
    color: var(--dark);
    font-weight: 600;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(2, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: background-color 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.disclaimer-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Disclaimer Popup */
.disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 74, 110, 0.95);
    z-index: 1000;
    /* hidden by default; disclaimer.js will show it when appropriate */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.disclaimer-popup {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s ease-out;
}

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

.disclaimer-popup h2 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.disclaimer-text {
    margin-bottom: 2rem;
}

.disclaimer-text ul {
    list-style: none;
    margin: 1rem 0;
}

.disclaimer-text li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
}

.disclaimer-text li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.accept-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.accept-button:hover {
    transform: translateY(-2px);
}

/* Legal Pages */
.legal-page {
    padding: 8rem 0 4rem;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(8, 145, 178, 0.1);
}

.legal-section h2 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-section p {
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* slightly smaller logo on small screens to avoid clipping */
    .logo {
        height: 34px;
        max-height: 40px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 10px 20px rgba(8, 145, 178, 0.1);
    }

    .nav-links.show {
        display: flex;
    }

    /* Mobile: dropdown becomes part of stacked nav; make menu visible when parent open */
    .nav-item.dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        min-width: 0;
    }

    .nav-item.dropdown .dropdown-menu a {
        padding-left: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* allow responsive wrappers to control iframe height — remove fixed 400px to avoid clipping on small screens */
    .game-frame {
        height: auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }
}