:root {
    --primary-bg: #021526;
    --primary-text: #ffffff;
    --secondary-bg: #03346E;
    --secondary-text: #B4D4FF;
    --accent-color: #6EACDA;
    --accent-text: #ffffff;
    --warning-color: #E2F1E7;
    --warning-text: #021526;
    --max-width: 1280px;
    --radius: 12px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, opacity 0.3s ease;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.3s ease;
}

button:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

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

ul,
ol {
    list-style: none;
}

input[type="checkbox"] {
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    h3 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    p,
    span,
    a,
    li,
    input,
    textarea {
        font-size: 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }
}

/* Accessibility focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* ===== main_header ===== */
header nav a {
    transition: color 0.3s ease;
}

.js-mobile-menu.open {
    max-height: 500px;
}

.js-modal {
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.js-modal.hidden {
    display: none;
    opacity: 0;
}

.js-modal:not(.hidden) {
    display: flex;
    opacity: 1;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ===== hero_section ===== */
#hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.js-particle {
    position: absolute;
    bottom: -50px;
    will-change: transform;
}

.hyphens-auto {
    hyphens: auto;
}

/* ===== reliability_info ===== */
#reliability {
    overflow: hidden;
    background-color: var(--primary-bg);
}

#reliability .js-reliability-content {
    width: 100%;
    background-color: var(--secondary-bg);
    border-color: var(--accent-color);
}

#reliability h2 {
    color: var(--primary-text);
    line-height: 1.2;
    hyphens: auto;
}

#reliability p {
    color: var(--secondary-text);
    hyphens: auto;
    line-height: 1.6;
}

#reliability i {
    color: var(--accent-color);
}

#reliability .bg-accent-dots {
    background-color: var(--accent-color);
}

/* ===== games_grid ===== */
#games-catalog {
    hyphens: auto;
}

.game-card img {
    transition: transform 0.5s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

.js-auth-modal.flex {
    display: flex;
}

.js-game-modal.flex {
    display: flex;
}

input::placeholder {
    color: #94a3b8;
}

#game-modal iframe {
    background: #000;
}

/* ===== login_popup ===== */
#auth-modal {
    overflow: hidden;
}

#auth-modal input::placeholder {
    color: var(--secondary-text);
    opacity: 0.6;
}

#auth-modal input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
}

.js-modal-overlay {
    backdrop-filter: blur(4px);
}

/* ===== loyalty_block ===== */
#reviews {
    position: relative;
    z-index: 10;
}

#reviews .js-reveal {
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

#reviews p {
    line-height: 1.6;
}

@media (max-width: 767px) {
    #reviews h2 {
        font-size: 16px !important;
    }

    #reviews p {
        font-size: 14px !important;
    }
}

/* ===== about_content ===== */
#about-us {
    color: var(--primary-text);
}

#about-us .container {
    position: relative;
    z-index: 2;
}

#about-us .object-fit-cover {
    object-fit: cover;
}

#about-us .hyphens-auto {
    hyphens: auto;
}

/* ===== why_choose_us ===== */
.js-benefits-section {
    hyphens: auto;
}

.js-benefits-section h2,
.js-benefits-section h3 {
    color: var(--primary-text);
}

.js-benefits-section p {
    color: var(--secondary-text);
}

.js-benefits-section i {
    color: var(--accent-color);
}

/* ===== how_it_works ===== */
#instructions {
    overflow: hidden;
}

.js-step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* ===== leisure_details ===== */
#features {
    position: relative;
}

#features h2,
#features h3 {
    hyphens: auto;
}

#features .container {
    max-width: 1200px;
}

/* ===== feedback_form ===== */
#contact-section {
    overflow: hidden;
}

#contact-section input::placeholder,
#contact-section textarea::placeholder {
    color: #B4D4FF80;
}

#contact-section input:focus,
#contact-section textarea:focus {
    box-shadow: 0 0 0 2px rgba(110, 172, 218, 0.2);
}

/* ===== mandatory_disclaimer ===== */
#disclaimer {
    overflow: hidden;
    background-color: var(--warning-color);
}

.disclaimer-logo-img {
    max-width: 65px;
    height: auto;
    display: block;
}

.disclaimer-main-text {
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .disclaimer-main-text {
        line-height: 1.5;
    }
}

#disclaimer .container {
    position: relative;
    z-index: 10;
}

/* ===== main_footer ===== */
.js-footer-logo {
    max-width: 70px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* White logos on dark backgrounds */
header img[src*="AmsGames_Logo"] {
    filter: brightness(0) invert(1);
}

#about-us img[src*="AmsGames_Logo"] {
    filter: brightness(0) invert(1);
}

#footer {
    hyphens: auto
}

footer a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px
}