/*
 * This file is part of Tiendina.
 * 
 * Copyright (C) 2025 Jorge Yagüe París
 * 
 * Tiendina is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Tiendina is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with Tiendina. If not, see <https://www.gnu.org/licenses/>.
 */

/* ========================================
   PIXEL ART GAME - STARDEW VALLEY INSPIRED
   ======================================== */
:root {
    /* Sky & Grass Background */
    --bg-sky: #87ceeb;
    --bg-sky-light: #b5e2f5;
    --bg-grass: #5a9f4b;
    --bg-grass-light: #7db86a;

    /* Wooden Panel Colors */
    --panel-bg: #f5e6c8;
    --panel-light: #fffef0;
    --wood-medium: #c9a66b;
    --wood-dark: #8b6914;
    --wood-darker: #5c4033;

    /* Primary (Orange - Buttons) */
    --primary: #e07b4c;
    --primary-light: #f4a574;
    --primary-dark: #b85a30;

    /* Secondary (Green) */
    --secondary: #5c8a4d;
    --secondary-light: #7db86a;
    --secondary-dark: #3d6b35;

    /* Accent & Feedback */
    --accent: #f5c542;
    --accent-light: #ffd966;
    --success: #6dc74a;
    --success-light: #8ed66a;
    --error: #d64541;
    --error-dark: #b33a37;

    /* Text Colors */
    --text-light: #fffef0;
    --text-dark: #5c4033;

    /* Borders */
    --border-dark: #3d2817;
    --border-medium: #8b7355;
    --border-light: #c9a66b;
}

/* ========================================
   RESET AND BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body {
    font-family: "VT323", monospace;
    background: linear-gradient(
        to bottom,
        var(--bg-sky-light) 0%,
        var(--bg-sky) 40%,
        var(--bg-grass) 40%,
        var(--bg-grass-light) 100%
    );
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Dyslexia-friendly font option */
body.dyslexia-font {
    font-family: "Lexend", sans-serif;
}

body.dyslexia-font .shopping-list li,
body.dyslexia-font .product-card,
body.dyslexia-font .basket-text,
body.dyslexia-font .modal-content,
body.dyslexia-font .toast,
body.dyslexia-font .game-header h1,
body.dyslexia-font button,
body.dyslexia-font input {
    font-family: "Lexend", sans-serif;
    letter-spacing: 0.05em;
}

/* ========================================
   LANGUAGE SELECTOR
   ======================================== */
.language-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--bg-sky-light) 0%,
        var(--bg-sky) 40%,
        var(--bg-grass) 40%,
        var(--bg-grass-light) 100%
    );
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.language-selector.hidden {
    display: none;
}

.language-selector-content {
    background: var(--panel-bg);
    padding: 40px;
    border: 4px solid var(--border-dark);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
    text-align: center;
}

.language-selector-content h2 {
    color: var(--wood-darker);
    font-size: 30px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0 var(--accent-light);
}

/* Intro Section Styles */
.intro-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 4px dashed var(--border-light);
}

.intro-title {
    color: var(--primary);
    font-size: 36px;
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 var(--primary-dark);
}

.intro-text {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.instructions {
    background: var(--panel-light);
    padding: 20px;
    border: 4px solid var(--border-light);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.instructions h3 {
    color: var(--secondary-dark);
    font-size: 22px;
    margin-bottom: 12px;
    text-shadow: 1px 1px 0 var(--accent-light);
}

.instructions ul {
    list-style: none;
    text-align: left;
    padding: 0;
}

.instructions li {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-left: 10px;
}

.instructions li:before {
    content: '►';
    color: var(--accent);
    margin-right: 10px;
    font-size: 14px;
}

.language-options {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.language-option {
    background: var(--panel-light);
    border: 4px solid;
    border-color: var(--border-light) var(--border-dark) var(--border-dark)
        var(--border-light);
    padding: 20px 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-family: "VT323", monospace;
    font-size: 16px;
    color: var(--text-dark);
    box-shadow: 4px 4px 0 var(--border-dark);
    transition: none;
}

.language-option:hover {
    background: var(--accent-light);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.language-option:active {
    border-color: var(--border-dark) var(--border-light) var(--border-light)
        var(--border-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

.language-option.selected {
    border-color: var(--secondary);
    background: var(--secondary-light);
    box-shadow: 4px 4px 0 var(--secondary-dark);
}

.lang-name {
    font-size: 20px;
    font-weight: normal;
    color: var(--text-dark);
}

.btn-lang-start {
    background: var(--primary);
    color: var(--text-light);
    padding: 15px 40px;
    font-size: 22px;
    border: 4px solid;
    border-color: var(--primary-light) var(--primary-dark) var(--primary-dark)
        var(--primary-light);
    box-shadow: 4px 4px 0 var(--border-dark);
    cursor: pointer;
    font-family: "VT323", monospace;
    transition: none;
}

.btn-lang-start:hover {
    background: var(--primary-light);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-lang-start:active {
    border-color: var(--primary-dark) var(--primary-light) var(--primary-light)
        var(--primary-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-lang-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 4px 4px 0 var(--border-dark);
}

.btn-lang-start:disabled:hover {
    transform: none;
    box-shadow: 4px 4px 0 var(--border-dark);
    background: var(--primary);
}

/* Language Actions Container */
.language-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-new-game,
.btn-continue-game {
    background: var(--primary);
    color: var(--text-light);
    padding: 15px 40px;
    font-size: 22px;
    border: 4px solid;
    border-color: var(--primary-light) var(--primary-dark) var(--primary-dark)
        var(--primary-light);
    box-shadow: 4px 4px 0 var(--border-dark);
    cursor: pointer;
    font-family: "VT323", monospace;
    transition: none;
    flex: 1;
    min-width: 180px;
}

.btn-continue-game {
    background: var(--secondary);
    border-color: var(--secondary-light) var(--secondary-dark)
        var(--secondary-dark) var(--secondary-light);
}

.btn-new-game:hover {
    background: var(--primary-light);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-new-game:active {
    border-color: var(--primary-dark) var(--primary-light) var(--primary-light)
        var(--primary-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-continue-game:hover {
    background: var(--secondary-light);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-continue-game:active {
    border-color: var(--secondary-dark) var(--secondary-light)
        var(--secondary-light) var(--secondary-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-new-game:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 4px 4px 0 var(--border-dark);
}

.btn-new-game:disabled:hover {
    transform: none;
    box-shadow: 4px 4px 0 var(--border-dark);
    background: var(--primary);
}

.btn-new-game.hidden,
.btn-continue-game.hidden {
    display: none;
}

/* Parent Info Button - Discreet Link Style */
.btn-parent-info-link {
    background: transparent;
    color: var(--border-medium);
    padding: 8px 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    font-family: "VT323", monospace;
    text-decoration: underline;
    opacity: 0.7;
    margin-top: 15px;
    transition: none;
}

.btn-parent-info-link:hover {
    color: var(--wood-dark);
    opacity: 1;
}

/* ========================================
   NAME INPUT SCREEN
   ======================================== */
.name-input-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--bg-sky-light) 0%,
        var(--bg-sky) 40%,
        var(--bg-grass) 40%,
        var(--bg-grass-light) 100%
    );
    z-index: 2500;
    display: flex;
    justify-content: center;
    align-items: center;
}

.name-input-screen.hidden {
    display: none;
}

.name-input-content {
    background: var(--panel-bg);
    padding: 40px;
    border: 4px solid var(--border-dark);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 400px;
}

.name-input-content h2 {
    color: var(--wood-darker);
    font-size: 30px;
    margin: 0;
    text-shadow: 2px 2px 0 var(--accent-light);
}

#player-name-input {
    background: var(--panel-light);
    border: 4px solid;
    border-color: var(--border-light) var(--border-dark) var(--border-dark)
        var(--border-light);
    padding: 15px 20px;
    font-family: "VT323", monospace;
    font-size: 24px;
    color: var(--text-dark);
    text-align: center;
    box-shadow: inset 2px 2px 0 var(--border-medium);
    transition: none;
}

#player-name-input:focus {
    outline: none;
    background: var(--accent-light);
    border-color: var(--secondary);
    box-shadow: inset 2px 2px 0 var(--secondary-dark);
}

#player-name-input::placeholder {
    color: var(--border-medium);
    opacity: 0.7;
}

/* ========================================
   GAME CONTAINER
   ======================================== */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
}

.game-container.hidden {
    display: none;
}

/* ========================================
   HEADER (WOODEN SIGN)
   ======================================== */
.game-header {
    background: var(--panel-bg);
    padding: 20px 30px;
    border: 4px solid var(--border-dark);
    margin-bottom: 20px;
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header h1 {
    color: var(--wood-darker);
    font-size: 32px;
    text-shadow: 2px 2px 0 var(--accent-light);
}

.game-info {
    display: flex;
    gap: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.info-item .label {
    font-size: 16px;
    color: var(--border-medium);
}

.info-item .value {
    font-size: 28px;
    color: var(--primary);
    text-shadow: 2px 2px 0 var(--primary-dark);
}

.btn-preferences {
    background: var(--wood-medium);
    color: var(--text-dark);
    border: 4px solid;
    border-color: var(--border-light) var(--border-dark) var(--border-dark)
        var(--border-light);
    padding: 8px 15px;
    font-size: 24px;
    cursor: pointer;
    font-family: "VT323", monospace;
    box-shadow: 4px 4px 0 var(--border-dark);
    transition: none;
    margin-left: 15px;
}

.btn-preferences:hover {
    background: var(--wood-dark);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-preferences:active {
    border-color: var(--border-dark) var(--border-light) var(--border-light)
        var(--border-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* ========================================
   MAIN GAME AREA
   ======================================== */
.game-main {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 20px;
    min-height: 600px;
}

/* ========================================
   SHELF SECTION (WOODEN CRATE)
   ======================================== */
.shelf-section {
    background: var(--panel-bg);
    padding: 25px;
    border: 4px solid var(--border-dark);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
}

.shelf-section h2 {
    color: var(--wood-darker);
    margin-bottom: 20px;
    font-size: 26px;
    text-shadow: 2px 2px 0 var(--accent-light);
}

.shelf-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    min-height: 300px;
}

.product-card {
    background: var(--panel-light);
    border: 4px solid;
    border-color: var(--border-light) var(--border-dark) var(--border-dark)
        var(--border-light);
    padding: 20px;
    text-align: center;
    cursor: grab;
    user-select: none;
    box-shadow: 4px 4px 0 var(--border-dark);
    transition: none;
    touch-action: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.product-card:hover {
    background: var(--accent-light);
    border-color: var(--wood-medium) var(--wood-darker) var(--wood-darker)
        var(--wood-medium);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--border-dark);
}

.product-card:active {
    cursor: grabbing;
    border-color: var(--border-dark) var(--border-light) var(--border-light)
        var(--border-dark);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.product-card.dragging {
    opacity: 0.5;
}

.product-emoji {
    font-size: 4rem;
    display: block;
}

.product-price {
    display: block;
    font-size: 1.2rem;
    color: var(--secondary-dark);
    margin-top: 8px;
    text-shadow: 1px 1px 0 var(--panel-light);
}

/* ========================================
   BASKET (GOLDEN STRAW/HAY)
   ======================================== */
.basket {
    background: var(--accent);
    border: 4px dashed var(--border-dark);
    padding: 30px;
    text-align: center;
    min-height: 180px;
    box-shadow:
        inset 0 0 0 4px var(--accent-light),
        4px 4px 0 var(--border-dark);
    transition: none;
}

.basket.drag-over {
    background: var(--success);
    border-color: var(--success-light);
    box-shadow:
        inset 0 0 0 4px var(--success-light),
        4px 4px 0 var(--border-dark);
}

.basket-icon {
    font-size: 5rem;
    margin-bottom: 10px;
}

.basket-text {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.basket-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.basket-item {
    font-size: 2.5rem;
    animation: pixelPopIn 0.2s steps(3);
}

@keyframes pixelPopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   LIST SECTION (WOODEN SIGN)
   ======================================== */
.list-section {
    background: var(--panel-bg);
    padding: 25px;
    border: 4px solid var(--border-dark);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
    display: flex;
    flex-direction: column;
}

.list-section h2 {
    color: var(--wood-darker);
    margin-bottom: 20px;
    font-size: 26px;
    text-shadow: 2px 2px 0 var(--accent-light);
}

.shopping-list {
    list-style: none;
    flex-grow: 1;
}

.shopping-list li {
    background: var(--panel-light);
    padding: 15px 20px;
    margin-bottom: 12px;
    font-size: 22px;
    color: var(--text-dark);
    border: 4px solid var(--border-dark);
    border-left: 8px solid var(--secondary);
    box-shadow: 4px 4px 0 var(--border-dark);
    transition: none;
}

.shopping-list li.completed {
    text-decoration: line-through;
    opacity: 0.7;
    background: var(--success-light);
    border-left-color: var(--success);
    color: var(--secondary-dark);
}

/* ========================================
   CONTROLS (ORANGE BUTTONS)
   ======================================== */
.controls {
    margin-top: 20px;
}

.btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-family: "VT323", monospace;
    border: 4px solid;
    cursor: pointer;
    transition: none;
    box-shadow: 4px 4px 0 var(--border-dark);
}

.btn-start {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary-light) var(--primary-dark) var(--primary-dark)
        var(--primary-light);
}

.btn-start:hover {
    background: var(--primary-light);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-start:active {
    border-color: var(--primary-dark) var(--primary-light) var(--primary-light)
        var(--primary-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-restart {
    background: var(--error);
    color: var(--text-light);
    border-color: #ff8787 var(--error-dark) var(--error-dark) #ff8787;
    margin-top: 10px;
}

.btn-restart:hover {
    background: #ff8787;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-restart:active {
    border-color: var(--error-dark) #ff8787 #ff8787 var(--error-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary-light) var(--primary-dark) var(--primary-dark)
        var(--primary-light);
    padding: 15px 40px;
    font-size: 14px;
    box-shadow: 4px 4px 0 var(--border-dark);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.btn-primary:active {
    border-color: var(--primary-dark) var(--primary-light) var(--primary-light)
        var(--primary-dark);
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--panel-bg);
    padding: 30px 50px;
    border: 4px solid var(--border-dark);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
    z-index: 1000;
    font-size: 36px;
    opacity: 0;
    transition: none;
}

.toast.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.toast.correct {
    background: var(--success-light);
    color: var(--text-dark);
    border-color: var(--success);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--success);
}

.toast.wrong {
    background: var(--error);
    color: var(--text-light);
    border-color: var(--error-dark);
    box-shadow:
        8px 8px 0 var(--border-dark),
        inset 0 0 0 4px var(--error-dark);
    animation: pixelShake 0.4s steps(4);
}

@keyframes pixelShake {
    0%,
    100% {
        transform: translate(-50%, -50%) translateX(0);
    }
    25% {
        transform: translate(-50%, -50%) translateX(-8px);
    }
    50% {
        transform: translate(-50%, -50%) translateX(8px);
    }
    75% {
        transform: translate(-50%, -50%) translateX(-8px);
    }
}

/* ========================================
   MODAL (WOODEN SIGN)
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 40, 23, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--panel-bg);
    padding: 40px;
    border: 4px solid var(--border-dark);
    box-shadow:
        12px 12px 0 var(--border-dark),
        inset 0 0 0 4px var(--wood-medium);
    text-align: center;
    max-width: 500px;
    animation: modalSlideIn 0.3s steps(5);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: var(--primary);
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 var(--primary-dark);
}

.modal-content p {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* ========================================
   PREFERENCES FORM
   ======================================== */
.preferences-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.preferences-form > label {
    font-size: 20px;
    color: var(--wood-darker);
    margin-bottom: -10px;
}

.preferences-form input[type="text"] {
    background: var(--panel-light);
    border: 4px solid;
    border-color: var(--border-light) var(--border-dark) var(--border-dark)
        var(--border-light);
    padding: 15px 20px;
    font-family: "VT323", monospace;
    font-size: 24px;
    color: var(--text-dark);
    text-align: center;
    box-shadow: inset 2px 2px 0 var(--border-medium);
    transition: none;
}

.preferences-form input[type="text"]:focus {
    outline: none;
    background: var(--accent-light);
    border-color: var(--secondary);
    box-shadow: inset 2px 2px 0 var(--secondary-dark);
}

.preference-option {
    background: var(--panel-light);
    padding: 20px;
    border: 4px solid var(--border-light);
    box-shadow: 2px 2px 0 var(--border-dark);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
}

.preference-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    border: 4px solid var(--border-dark);
    appearance: none;
    background: var(--panel-light);
    position: relative;
}

.preference-checkbox:checked {
    background: var(--secondary);
}

.preference-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-size: 18px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 20px;
    color: var(--wood-darker);
}

.preference-description {
    margin-top: 10px;
    margin-left: 39px;
    font-size: 16px;
    color: var(--border-medium);
    line-height: 1.4;
}

.preferences-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.preferences-buttons .btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
}

/* ========================================
   CONFETTI ANIMATION
   ======================================== */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border: 2px solid var(--border-dark);
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 1200px) {
    .shelf-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .game-header h1 {
        font-size: 26px;
    }

    .info-item .value {
        font-size: 24px;
    }
}

@media (max-width: 900px) {
    .game-main {
        grid-template-columns: 1fr;
    }

    .shelf-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    body {
        padding: 10px;
    }

    .game-header h1 {
        font-size: 22px;
    }

    .language-selector-content h2 {
        font-size: 24px;
    }

    .language-option {
        padding: 15px 20px;
    }

    .name-input-content {
        min-width: 300px;
        padding: 30px;
    }

    .name-input-content h2 {
        font-size: 24px;
    }

    #player-name-input {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .shelf-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-emoji {
        font-size: 3rem;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .game-info {
        gap: 20px;
    }

    .name-input-content {
        min-width: auto;
        max-width: 90vw;
        padding: 25px 20px;
    }

    .name-input-content h2 {
        font-size: 20px;
    }

    #player-name-input {
        font-size: 18px;
        padding: 12px 15px;
    }
}

/* ========================================
   FOOTER
   ======================================== */
.game-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(61, 40, 23, 0.9);
    z-index: 4000;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.version {
    color: var(--text-light);
}

.separator {
    color: var(--accent);
}

.license {
    color: var(--text-light);
}

.repository-link {
    color: var(--accent);
    text-decoration: underline;
    font-family: 'VT323', monospace;
    font-size: 18px;
}

.repository-link:hover {
    color: var(--accent-light);
}

/* Parent Info Modal Styles */
#parent-info-modal {
    z-index: 4000;
}

.parent-info-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.parent-info-content h2 {
    text-align: center;
    margin-bottom: 25px;
}

.parent-info-section {
    margin-bottom: 20px;
}

.parent-info-section h3 {
    color: var(--secondary-dark);
    font-size: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 0 var(--accent-light);
}

.parent-info-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.parent-info-section li {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
    line-height: 1.4;
}

.parent-info-section li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 20px;
}

.parent-info-section p {
    font-size: 18px;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 10px;
}

#close-parent-info-btn {
    margin-top: 20px;
    width: 100%;
}

/* Footer responsive adjustments */
@media (max-width: 600px) {
    .game-footer {
        padding: 12px 15px;
    }
    
    .footer-info {
        font-size: 15px;
        gap: 8px;
    }
    
    .repository-link {
        font-size: 15px;
    }
}

/* Parent Info Responsive */
@media (max-width: 900px) {
    .parent-info-content {
        max-width: 90vw;
        padding: 30px;
    }
    
    .parent-info-section h3 {
        font-size: 20px;
    }
    
    .parent-info-section li,
    .parent-info-section p {
        font-size: 16px;
    }
    
    .btn-parent-info-link {
        font-size: 15px;
    }
}

@media (max-width: 600px) {
    .parent-info-content {
        padding: 25px 20px;
        max-height: 85vh;
    }
    
    .parent-info-section h3 {
        font-size: 18px;
    }
    
    .parent-info-section li {
        font-size: 15px;
        padding-left: 20px;
        margin-bottom: 6px;
    }
    
    .parent-info-section li:before {
        font-size: 16px;
    }
    
    .parent-info-section p {
        font-size: 15px;
    }
    
    .btn-parent-info-link {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* Intro Section Responsive */
@media (max-width: 900px) {
    .intro-title {
        font-size: 28px;
    }
    
    .intro-text {
        font-size: 18px;
    }
    
    .instructions h3 {
        font-size: 20px;
    }
    
    .instructions li {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .intro-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .intro-title {
        font-size: 24px;
    }
    
    .intro-text {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .instructions h3 {
        font-size: 18px;
    }
    
    .instructions li {
        font-size: 15px;
        margin-bottom: 6px;
    }
}
