/* CSS Reset & Base Styles */
*, *::before, *::after {
    box-sizing: inherit;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Segoe UI, Tahoma, Geneva, sans-serif;
    background-color: #04111f; /* Dark blue background */
    color: #fdf2cc; /* Light gold text */
}

main {
    flex: 1;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

img, canvas, iframe, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    box-sizing: border-box;
}

/* Global Variables and Theme */
:root {
    --bg-primary: #04111f;
    --color-primary: #d4a017; /* Gold */
    --color-secondary: #1e8c6e; /* Teal */
    --color-accent: #ff6b35; /* Orange-Red */
    --color-text: #fdf2cc; /* Light Gold */
    --color-dark-overlay: rgba(0, 0, 0, 0.6);
    --card-bg: rgba(255, 255, 255, 0.05);
    --modal-bg: rgba(0, 0, 0, 0.85);
    --border-radius-card: 16px;
    --border-radius-large: 24px;
    --shadow-primary: 0 0 30px rgba(255, 107, 53, 0.4); /* Accent color shadow */
}

/* Utility Classes */
.cxjqm2-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.cxjqm2-content-section {
    padding: 80px 20px;
    line-height: 1.8;
    font-size: 1.1rem;
    background-color: var(--card-bg); /* Slightly lighter than body */
    border-radius: var(--border-radius-large);
    margin: 40px 20px; /* Add some margin around sections */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px); /* Subtle blur effect */
}

/* Buttons */
.cxjqm2-btn {
    display: inline-block;
    padding: 14px 32px; /* Larger padding */
    border-radius: 50px; /* Fully rounded */
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem; /* Slightly larger font */
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background-image: linear-gradient(90deg, var(--color-accent) 0%, rgba(255, 107, 53, 0.7) 100%); /* Gradient */
    color: var(--color-text); /* Gold text on button */
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3); /* Accent shadow */
}

.cxjqm2-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.5);
}

/* Header */
.cxjqm2-header-l-c-r {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3); /* Semi-transparent dark */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px); /* Glassmorphism */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

.cxjqm2-logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem; /* Larger logo text */
    font-weight: 700;
    color: var(--color-primary); /* Gold */
    letter-spacing: 0.5px;
}

.cxjqm2-logo span {
    text-shadow: 0 0 10px rgba(212, 160, 23, 0.5); /* Subtle glow */
}

.cxjqm2-desktop-nav ul {
    display: flex;
    gap: 25px; /* Increased gap */
    align-items: center;
    justify-content: center;
    list-style: none;
}

.cxjqm2-desktop-nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 30px; /* Pill shape */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cxjqm2-desktop-nav a:hover {
    background-color: rgba(212, 160, 23, 0.2); /* Gold hover background */
    color: var(--color-primary);
}

.cxjqm2-header-right {
    display: flex;
    align-items: center;
}

.cxjqm2-age-flag {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 20px;
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.cxjqm2-hamburger {
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--color-text); /* White border */
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.cxjqm2-hamburger:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Mobile Menu */
.cxjqm2-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: var(--modal-bg); /* Darker overlay */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
}

.cxjqm2-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.cxjqm2-mobile-menu li {
    margin-bottom: 25px;
}

.cxjqm2-mobile-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 1.6rem;
    font-weight: 600;
    padding: 15px;
    display: block;
    transition: color 0.3s ease;
}

.cxjqm2-mobile-menu a:hover {
    color: var(--color-primary);
}

.cxjqm2-close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem; /* Larger close button */
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.cxjqm2-close-menu:hover {
    color: var(--color-primary);
    transform: rotate(180deg);
}

/* Disclosure Bar */
#cxjqm2-disclosure-bar {
    background: #1a0800; /* Dark reddish brown */
    color: #ffd700; /* Bright gold */
    text-align: center;
    padding: 10px 16px; /* Slightly more padding */
    font-size: 0.85em; /* Smaller font for disclosure */
    font-weight: 700;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #e65c00; /* Orange border */
    width: 100%;
    box-sizing: border-box;
}

/* Hero Section */
.cxjqm2-hero {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(300px, 0.8fr);
    align-items: center;
    padding: 140px 5% 80px; /* Increased top padding */
    gap: 60px;
    max-width: 1400px; /* Slightly wider max width */
    margin: 0 auto;
    min-height: 70vh; /* Ensure hero has height */
    background-image: url('path/to/your/pirate-cove-hero-background.jpg'); /* Placeholder for background image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    border-radius: var(--border-radius-large);
    overflow: hidden; /* Ensure children don't overflow */
    position: relative; /* For absolute positioning of overlays/elements */
}

.cxjqm2-hero::before { /* Overlay for better text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 17, 31, 0.7); /* Dark blue overlay matching theme */
    z-index: 1;
}

.cxjqm2-hero-text {
    position: relative;
    z-index: 2; /* Ensure text is above overlay */
    padding-right: 40px;
}

.cxjqm2-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Responsive font size */
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 900; /* Extra bold */
    letter-spacing: -0.5px;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.cxjqm2-hero p {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px; /* Limit width for readability */
}

.cxjqm2-hero-cta-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.cxjqm2-hero-image {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center; /* Vertically align image */
    z-index: 2; /* Above overlay */
}

.cxjqm2-hero-image img {
    width: 100%;
    height: 600px; /* Fixed height */
    object-fit: cover; /* Cover the area */
    border-radius: 40px 0 40px 0; /* Asymmetric border radius */
    box-shadow: 20px 20px 0px rgba(0, 0, 0, 0.1); /* Offset shadow */
}

/* Trust Badges */
.cxjqm2-trust-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 160, 23, 0.2);
    z-index: 3;
}

/* Game Grid */
.cxjqm2-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px 30px; /* Larger gap */
    max-width: 1200px;
    margin: 80px auto; /* More vertical margin */
    padding: 0 20px;
}

/* Game Card */
.cxjqm2-game-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-large); /* Larger radius */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06); /* Soft initial shadow */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push content down */
}

.cxjqm2-game-card:hover {
    transform: translateY(-10px) scale(1.03); /* More pronounced hover */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15); /* Deeper shadow on hover */
}

.cxjqm2-game-card-image-container {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.2); /* Darker placeholder */
    border-radius: var(--border-radius-card); /* Round the image container */
    margin: -30px 0 20px 0; /* Negative margin to pull it up */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* Shadow for the image itself */
    display: flex; /* Use flex for potential overlays */
    justify-content: center;
    align-items: center;
}

.cxjqm2-game-card-image-container img {
    width: 100%;
    height: 100%; /* Ensure image fills container */
    object-fit: cover;
    border-radius: var(--border-radius-card); /* Match container radius */
}

.cxjqm2-game-card-content {
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Allow content to take available space */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push title/description to bottom */
}

.cxjqm2-game-card h3 {
    font-size: 1.4rem; /* Larger titles */
    margin-bottom: 10px;
    color: var(--color-primary); /* Gold title */
    text-shadow: 0 0 8px rgba(212, 160, 23, 0.3);
}

.cxjqm2-game-card p {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 20px; /* Space before potential button */
}

/* Footer */
.cxjqm2-footer {
    padding: 60px 20px;
    background: rgba(10, 10, 10, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto; /* Push footer to bottom */
    width: 100%;
    box-sizing: border-box;
}

.cxjqm2-footer .cxjqm2-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cxjqm2-footer-logo {
    margin-bottom: 15px;
    transform: scale(0.8); /* Slightly smaller logo in footer */
}

.cxjqm2-footer ul {
    display: flex;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px; /* Space below nav links */
}

.cxjqm2-footer li {
    margin-bottom: 10px;
}

.cxjqm2-footer a {
    text-decoration: none;
    color: rgba(253, 242, 204, 0.8); /* Slightly muted text */
    font-weight: 500;
    transition: color 0.3s ease;
}

.cxjqm2-footer a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.cxjqm2-footer-contact {
    margin-top: 20px;
    font-size: 0.85em;
    text-align: center;
    opacity: 0.85;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cxjqm2-footer-contact span {
    color: var(--color-text);
}

.cxjqm2-footer-info-block {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px; /* Increased padding */
    margin-top: 25px; /* Increased margin */
    width: 100%;
    font-size: 0.95em; /* Slightly larger text */
    line-height: 1.7;
}

.cxjqm2-footer-info-block h4 {
    margin: 0 0 10px 0;
    color: var(--color-primary);
    font-size: 1.3em; /* Larger heading */
    text-shadow: 0 0 12px rgba(212, 160, 23, 0.4);
}

.cxjqm2-footer-info-block p {
    margin: 0;
    opacity: 0.9;
    font-size: 1em; /* Consistent font size */
    text-align: justify;
}

.cxjqm2-footer-info-block a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cxjqm2-footer-info-block a:hover {
    color: #e65c00; /* Darker orange on hover */
}

.cxjqm2-regulatory {
    border-top: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 0.85em;
    opacity: 0.75;
    line-height: 1.6;
    text-align: left;
}

.cxjqm2-regulatory strong {
    display: block;
    margin-bottom: 6px;
    opacity: 0.9;
    color: var(--color-primary);
    font-size: 1.1em;
}

.cxjqm2-copyright {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8em;
    opacity: 0.7;
    line-height: 1.5;
}

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
    .cxjqm2-hero {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        padding: 100px 5% 60px !important;
        gap: 40px !important;
        text-align: center !important;
    }
    .cxjqm2-hero h1 {
        font-size: clamp(1.8rem, 5vw, 3rem) !important;
    }
    .cxjqm2-hero p {
        max-width: none !important; /* Allow full width on mobile */
    }
    .cxjqm2-hero-image {
        display: none !important; /* Hide image on tablet/mobile */
    }
    .cxjqm2-hero-cta-container {
        justify-content: center; /* Center buttons */
    }
    .cxjqm2-game-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    }
    .cxjqm2-content-section {
        margin: 30px 16px; /* Smaller section margins */
    }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
    html, body {
        font-size: 15px;
        overflow-x: hidden;
    }
    .cxjqm2-header {
        padding: 12px 16px !important;
    }
    .cxjqm2-logo {
        font-size: 1.5rem;
    }
    .cxjqm2-desktop-nav {
        display: none !important;
    }
    .cxjqm2-hamburger {
        display: flex !important; /* Show hamburger */
    }
    .cxjqm2-hero {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        padding: 60px 16px 40px !important;
        text-align: center !important;
        gap: 24px !important;
        min-height: unset !important;
        background-attachment: scroll !important; /* Remove parallax on mobile */
    }
    .cxjqm2-hero h1, .cxjqm2-hero-text h1 {
        font-size: clamp(1.6rem, 7vw, 2.4rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
    }
    .cxjqm2-hero p, .cxjqm2-hero-text p {
        font-size: 1rem !important;
    }
    .cxjqm2-hero-image {
        display: none !important;
    }
    .cxjqm2-hero img {
        display: none !important;
    }
    .cxjqm2-hero-cta-container {
        flex-direction: column; /* Stack buttons */
        align-items: center;
    }
    .cxjqm2-btn {
        width: 80%; /* Make buttons wider */
        max-width: 300px;
    }
    .cxjqm2-game-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Two columns on mobile */
        gap: 12px !important;
        padding: 0 12px !important;
        margin-top: 50px; /* Adjust margin */
    }
    .cxjqm2-game-card {
        border-radius: 12px !important;
    }
    .cxjqm2-game-card-image-container {
        height: 140px !important; /* Smaller image on mobile */
        margin: -20px 0 15px 0;
    }
    .cxjqm2-content-section {
        padding: 40px 16px !important;
        font-size: 1rem !important;
        margin: 20px 10px; /* Smaller margins */
    }
    .cxjqm2-footer {
        padding: 30px 16px !important;
        font-size: 0.85rem !important;
    }
    .cxjqm2-footer ul {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px;
    }
    .cxjqm2-footer-info-block {
        padding-top: 20px;
        margin-top: 20px;
        font-size: 0.9rem;
    }
    .cxjqm2-footer-info-block h4 {
        font-size: 1.1em;
    }
    .cxjqm2-footer-contact {
        margin-top: 15px;
    }
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    img, video, iframe {
        max-width: 100% !important;
    }
    .cxjqm2-trust-badge {
        position: static !important; /* Stack badges */
        margin-top: 10px;
        width: fit-content; /* Fit content width */
        margin-left: auto;
        margin-right: auto;
    }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
    .cxjqm2-hero h1, .cxjqm2-hero-text h1 {
        font-size: clamp(1.4rem, 8vw, 2rem) !important;
    }
    .cxjqm2-game-grid {
        grid-template-columns: 1fr !important; /* Single column on very small screens */
    }
    .cxjqm2-game-card-image-container {
        height: 180px !important; /* Slightly larger than standard mobile */
    }
    .cxjqm2-logo {
        font-size: 1.3rem;
    }
    .cxjqm2-header-right {
        gap: 10px;
    }
    .cxjqm2-age-flag {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    .cxjqm2-hamburger {
        padding: 5px 8px;
        font-size: 1.3rem;
    }
    .cxjqm2-mobile-menu a {
        font-size: 1.4rem;
    }
    .cxjqm2-close-menu {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
    #cxjqm2-disclosure-bar {
        font-size: 0.75em;
        padding: 8px 10px;
    }
}

/* === DESKTOP ONLY: Hide hamburger === */
@media (min-width: 769px) {
    .cxjqm2-hamburger {
        display: none !important;
    }
    .cxjqm2-desktop-nav {
        display: flex !important; /* Ensure desktop nav is visible */
    }
    .cxjqm2-hero {
        padding: 140px 5% 100px; /* More top padding for desktop */
    }
    .cxjqm2-game-grid {
        gap: 60px 40px; /* Larger gaps on desktop */
    }
    .cxjqm2-game-card {
        border-radius: 24px;
    }
    .cxjqm2-game-card-image-container {
        margin: -40px 0 25px 0; /* Larger negative margin */
        height: 280px;
    }
    .cxjqm2-content-section {
        margin: 60px 20px; /* Wider section margins */
    }
    .cxjqm2-footer {
        padding: 80px 20px;
    }
    .cxjqm2-footer ul {
        gap: 40px;
    }
}

/* Specific Element Overrides for Trust Badges */
.cxjqm2-hero .cxjqm2-trust-badge {
    position: absolute; /* Keep positioned in hero */
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 160, 23, 0.2);
    z-index: 3;
}

@media (max-width: 768px) {
    .cxjqm2-hero .cxjqm2-trust-badge {
        position: static !important;
        margin-top: 15px;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Ensure background image applies only to hero */
.cxjqm2-hero {
    background-image: url('assets-1mawk/images/pirate-cove-hero-bg.jpg'); /* Example image path */
}