:root {
    --primary-bg: #0f172a;
    --secondary-bg: #1e293b;
    --accent-color: #3b82f6;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-main: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-accent: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    --radius: 12px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary-bg);
    background-image: var(--gradient-main);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    transition: color var(--transition-speed) ease-in-out, opacity var(--transition-speed) ease-in-out;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: transform 0.1s ease-in-out, filter var(--transition-speed) ease;
}

button:active {
    transform: scale(0.98);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    letter-spacing: 0.025em;
    margin-bottom: 1rem;
    color: inherit;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    body {
        font-size: 0.9375rem;
    }

    .text-break-mobile {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== header ===== */
.nav-link-custom:hover {
    color: var(--text-primary) !important;
}

#game-frame:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.js-mobile-toggle:focus {
    outline: none;
}

/* ===== hero_section ===== */
#hero {
    background-color: var(--primary-bg);
}

.js-share-btn {
    transition: all 0.3s ease-in-out;
}

.js-share-btn:hover {
    background-color: var(--accent-color) !important;
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.js-share-btn:hover svg {
    color: var(--text-primary) !important;
}

.btn-lg {
    transition: transform 0.2s ease;
}

.btn-lg:hover {
    transform: scale(1.05);
}

/* ===== play_game ===== */
#game-frame {
    background: var(--primary-bg);
    padding: 80px 0
}

.game-frame-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5)
}

.js-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center
}

.overlay-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.play-btn {
    background: var(--gradient-accent);
    border: none;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    cursor: pointer
}

.play-btn:hover {
    transform: scale(1.1)
}

.game-description-box {
    margin-top: 30px;
    background: var(--secondary-bg);
    padding: 25px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent-color)
}

@media(max-width:768px) {
    .game-frame-wrapper {
        height: 400px
    }

    .play-btn {
        width: 80px;
        height: 80px
    }
}

/* ===== app_details ===== */
#game-info .info-item {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

#game-info .info-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

#game-info .js-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#game-info .js-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== game_modes ===== */
#game-modes .accordion-button:focus {
    box-shadow: none;
}

#game-modes .accordion-button:not(.collapsed) {
    color: var(--accent-color);
    background: var(--secondary-bg);
}

#game-modes .accordion-button::after {
    filter: invert(1);
}

#game-modes .mode-visual-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#game-modes .js-mode-img {
    transition: opacity 0.5s ease-in-out;
    object-fit: cover;
    aspect-ratio: 16/10;
}

#game-modes .accordion-item {
    transition: transform 0.3s ease;
}

#game-modes .accordion-item:hover {
    transform: translateX(5px);
}

/* ===== ratings_distribution ===== */
.btn-rate {
    background: var(--gradient-accent);
    border: none;
    padding: 14px 32px;
    color: var(--text-primary);
    border-radius: var(--radius);
    transition: all .3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: .9rem
}

.btn-rate:hover {
    opacity: .9;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, .2)
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px
}

.rating-label {
    width: 60px;
    color: var(--text-secondary);
    font-size: .9rem;
    font-weight: 600
}

.rating-percent {
    width: 45px;
    color: var(--text-secondary);
    font-size: .9rem;
    text-align: right;
    font-weight: 600
}

.tracking-wider {
    letter-spacing: .05em
}

/* ===== update_log ===== */
#changelog {
    width: 100%;
}

#changelog .js-changelog-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== game_reviews ===== */
.review-card {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease
}

.media-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    margin-top: auto
}

#user-reviews .container {
    max-width: 1140px
}

/* ===== team_game ===== */
#developer-info .js-game-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#developer-info .badge {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== bug_report ===== */
#support-form .form-control:focus,
#support-form .form-select:focus {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 .25rem rgba(59, 130, 246, .25)
}

#support-form .form-control::placeholder {
    color: var(--text-secondary);
    opacity: .6
}

#support-form .form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color)
}

#support-form .btn:hover {
    transform: translateY(-2px);
    opacity: 0.9
}

/* ===== footer ===== */
#footer {
    width: 100%;
    position: relative;
    overflow: hidden;
}

#footer .js-nav-link,
#footer .js-legal-link {
    transition: color 0.3s ease, transform 0.2s ease;
}

#footer .js-nav-link:hover,
#footer .js-legal-link:hover {
    color: var(--accent-color) !important;
}

#footer img.rounded {
    transition: transform 0.3s ease;
}

#footer img.rounded:hover {
    transform: scale(1.08);
}

#footer .border-secondary {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

#hero, #game-frame, #game-info, #game-modes, #modesAccordion, #collapseCampaign, #collapseEndless, #collapsePvP, #collapseChallenges, #mode-img-4, #mode-img-5, #mode-img-6, #game-ratings, #changelog, #user-reviews, #developer-info, #support-form, #bug-consent, #footer{
    overflow: hidden !important;
}