:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-dark: #0a0a0a;
    --bg-modal: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #ffffff;
    --border-color: #333333;
    --border-light: #404040;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --accent-gold: #d4a574;
    --accent-gold-hover: #c29563;
    --accent-gold-text: #1a1a1a;
    --card-bg: #2a2a2a;
    --card-hover-shadow: rgba(0, 0, 0, 0.3);
    --price-color: #ff6b6b;
    --header-bg: #0a0a0a;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: hidden;
    color-scheme: light dark;
}

/* --- SPLASH SCREEN --- */
#initial-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#initial-splash h1 {
    font-size: 50px;
    letter-spacing: 5px;
}

#initial-splash img {
    width: 800px;
    height: 800px;
    object-fit: contain;
}

/* --- COUNTRY MODAL --- */
#country-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

#country-modal.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 60px 80px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    text-align: center;
    border: 1px solid var(--border-light);
}

.modal-content h2 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 30px;
}

.modal-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 600px;
}

.modal-buttons button {
    padding: 12px 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--accent-gold);
    color: var(--accent-gold-text);
    transition: background-color 0.2s, transform 0.1s;
}

.modal-buttons button:hover {
    background-color: var(--accent-gold-hover);
}

/* --- HEADER --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--header-bg);
    color: var(--text-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo-small a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
}

.logo-small img {
    height: 105px;
    width: auto;
    vertical-align: middle;
}

.country-display {
    font-size: 16px;
    font-weight: 300;
}

.content-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- GAME GRID --- */
#game-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.game-card-link {
    text-decoration: none;
    color: inherit;
}

.game-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--card-hover-shadow);
}

.game-card-image {
    width: 100%;
    height: 150px;
    background-color: #444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.game-card-info {
    padding: 15px;
}

.game-card-info h3 {
    margin-top: 0;
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.game-card-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 0;
}

/* --- PRICE DETAIL PAGE --- */
.detail-container {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.price-list {
    list-style: none;
    padding: 0;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.price-item:hover {
    border-color: var(--accent-gold);
}

.item-name {
    font-weight: bold;
    font-size: 1.1em;
}

.item-price {
    font-size: 1.2em;
    color: var(--price-color);
    font-weight: bold;
}

/* --- BUY BUTTON --- */
.buy-button {
    background-color: var(--accent-gold);
    color: var(--accent-gold-text);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    width: 100%;
    transition: background-color 0.2s;
}

.buy-button:hover {
    background-color: var(--accent-gold-hover);
}

/* Dark mode specific override for buy button */
@media (prefers-color-scheme: dark) {
    .buy-button {
        background-color: #ffffff;
        color: #000000;
    }

    .buy-button:hover {
        background-color: #e0e0e0;
    }
}

/* --- WHATSAPP BUTTON --- */
.whatsapp-button {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.whatsapp-button:hover {
    background-color: #128C7E;
}

.whatsapp-icon-img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 110px;
    right: 40px;
    background-color: var(--accent-gold);
    color: var(--accent-gold-text);
    border: none;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 2px 2px 3px #999;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.back-to-top-btn:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-3px);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    #game-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .modal-buttons {
        grid-template-columns: 1fr;
    }

    #game-list {
        grid-template-columns: 1fr;
    }
}