/* --- CONFIGURATION GLOBALE --- */
:root {
    --bg-color: #121216;
    --ui-frame-color: #4a5a6a;
    --ui-bg-color: rgba(10, 15, 25, 0.9);
    --text-color: #ecf0f1;
    --accent-color: #f39c12;
    --pixel-font: 'Press Start 2P', cursive;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-color);
    font-family: var(--pixel-font);
    color: var(--text-color);
    font-size: 12px;
    line-height: 1.8;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* --- ÉCRAN PRINCIPAL --- */
.game-screen-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.game-screen-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url('gachamon.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: 1;
}

.game-ui-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78),
        rgba(0, 0, 0, 0.25) 45%,
        rgba(0, 0, 0, 0.05)
    );
}

/* --- MENU RPG --- */
.rpg-menu-box {
    width: 100%;
    max-width: 560px;
    margin: 0 auto 30px auto;
    padding: 20px;
    background-color: var(--ui-bg-color);
    border: 4px solid var(--ui-frame-color);
    box-shadow: 0 0 0 4px #000;
}

.rpg-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rpg-menu-list li {
    margin-bottom: 14px;
}

.rpg-menu-list li:last-child {
    margin-bottom: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.menu-item .pointer {
    opacity: 0;
    margin-right: 14px;
    color: var(--accent-color);
    transition: opacity 0.2s ease;
}

.menu-item:hover,
.menu-item.active {
    color: var(--accent-color);
}

.menu-item:hover .pointer,
.menu-item.active .pointer {
    opacity: 1;
}

.menu-item.disabled {
    color: #5f5f5f;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- BOÎTE DE DIALOGUE --- */
.dialogue-box {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--ui-bg-color);
    border: 4px solid var(--ui-frame-color);
    box-shadow: 0 0 0 4px #000;
}

.dialogue-box p {
    margin: 0;
}

/* --- LIEN POUR DESCENDRE --- */
.scroll-indicator {
    display: inline-block;
    margin: 22px auto 0 auto;
    color: var(--accent-color);
    text-decoration: none;
    text-align: center;
    font-size: 10px;
    animation: floatIndicator 1.4s ease-in-out infinite;
}

@keyframes floatIndicator {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

/* --- SECTIONS EN DESSOUS --- */
.page-section {
    width: 100%;
    padding: 90px 20px;
    border-top: 4px solid var(--ui-frame-color);
    background:
        linear-gradient(rgba(18, 18, 22, 0.96), rgba(18, 18, 22, 0.96)),
        url('gachamon.png') center center / cover no-repeat fixed;
}

.section-panel {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px;
    background-color: var(--ui-bg-color);
    border: 4px solid var(--ui-frame-color);
    box-shadow: 0 0 0 4px #000;
}

.section-panel h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--accent-color);
    text-align: center;
    line-height: 1.5;
}

.section-panel p {
    margin: 0 0 20px 0;
}

/* --- NOTES DE VERSION --- */
.patch-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 3px solid var(--ui-frame-color);
    box-shadow: 0 0 0 3px #000;
    padding: 20px;
    margin-bottom: 22px;
    text-align: left;
}

.patch-card:last-child {
    margin-bottom: 0;
}

.patch-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--accent-color);
    line-height: 1.5;
}

.patch-date {
    margin-bottom: 16px;
    color: #b7b7b7;
    font-size: 10px;
}

.patch-card ul {
    margin: 0;
    padding-left: 20px;
}

.patch-card li {
    margin-bottom: 10px;
}

.patch-card li:last-child {
    margin-bottom: 0;
}

/* --- FENÊTRES CACHÉES (TEST / TÉLÉCHARGEMENT) --- */
.hidden-section {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 30px 15px;
    background-color: rgba(10, 10, 15, 0.98);
}

.section-content {
    width: 90%;
    max-width: 900px;
    text-align: center;
}

.section-content h2 {
    margin-top: 0;
    margin-bottom: 40px;
    color: var(--accent-color);
    line-height: 1.5;
}

/* --- CADRE JEU NAVIGATEUR --- */
.browser-game-frame {
    width: 100%;
    height: 500px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #000;
    border: 8px solid var(--ui-frame-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 0 4px #000;
}

.browser-game-frame p {
    margin: 0 0 20px 0;
    text-align: center;
}

/* --- BOUTONS --- */
.rpg-btn {
    display: inline-block;
    padding: 15px 30px;
    font-family: var(--pixel-font);
    font-size: 10px;
    text-decoration: none;
    color: #fff;
    background-color: var(--ui-frame-color);
    border: 4px solid #fff;
    cursor: pointer;
    transition: 0.2s ease;
}

.rpg-btn:hover {
    background-color: var(--accent-color);
    border-color: #000;
    color: #000;
}

/* --- ZONE TÉLÉCHARGEMENT --- */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.download-card {
    padding: 30px;
    background-color: var(--ui-bg-color);
    border: 4px solid var(--ui-frame-color);
    box-shadow: 0 0 0 4px #000;
    text-align: center;
}

.download-card h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--accent-color);
    line-height: 1.5;
}

.download-card p {
    margin-bottom: 20px;
}

.reviews-stars {
    font-size: 24px;
    color: #ffd700;
    letter-spacing: 4px;
}

.site-footer {
    width: 100%;
    padding: 20px 10px;
    background: rgba(0, 0, 0, 0.85);
    border-top: 2px solid #ffffff;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-text {
    font-size: 10px;
    opacity: 0.8;
}

.footer-link {
    font-size: 11px;
    color: #ffd700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: 0.2s;
}

.footer-link:hover {
    border-bottom: 1px solid #ffd700;
}

.reviews-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 30px;
    padding: 20px;
    border: 2px solid #ffffff;
    background: rgba(0, 0, 0, 0.55);
    text-align: center;
}

.reviews-average {
    font-size: 26px;
    color: #ffd700;
}

.reviews-count {
    font-size: 12px;
    opacity: 0.9;
}

@media screen and (max-width: 1024px) {
    .desktop-only {
        display: none;
    }
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.review-form label {
    font-size: 12px;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffffff;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.review-form textarea {
    resize: vertical;
    min-height: 120px;
}

.star-rating {
    display: flex;
    gap: 10px;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
}

.star {
    color: #666;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star:hover {
    transform: scale(1.1);
}

.star.active {
    color: #ffd700;
}

.review-message {
    min-height: 20px;
    font-size: 11px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.review-card {
    border: 2px solid #ffffff;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
}

.review-card h3 {
    margin-bottom: 10px;
    font-size: 14px;
}

.review-stars {
    margin-bottom: 10px;
    font-size: 18px;
    color: #ffd700;
}

.review-text {
    font-size: 12px;
    line-height: 1.7;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .game-ui-overlay {
        padding: 25px;
    }

    .section-panel {
        padding: 24px;
    }

    .dialogue-box,
    .rpg-menu-box {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    html,
    body {
        font-size: 10px;
        line-height: 1.7;
    }

    .game-ui-overlay {
        padding: 20px 14px;
    }

    .rpg-menu-box,
    .dialogue-box,
    .section-panel {
        padding: 18px;
    }

    .section-panel h2,
    .section-content h2 {
        margin-bottom: 24px;
    }

    .page-section {
        padding: 60px 14px;
        background:
            linear-gradient(rgba(18, 18, 22, 0.97), rgba(18, 18, 22, 0.97)),
            url('gachamon.png') center center / cover no-repeat;
    }

    .browser-game-frame {
        height: 320px;
        padding: 16px;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .rpg-btn {
        font-size: 9px;
        padding: 12px 18px;
    }

    .scroll-indicator {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .rpg-menu-list li {
        margin-bottom: 12px;
    }

    .menu-item {
        line-height: 1.8;
    }

    .patch-card {
        padding: 16px;
    }

    .download-card {
        padding: 20px;
    }

    .browser-game-frame {
        height: 260px;
    }
}

@media screen and (max-width: 1024px) {
    .desktop-only {
        display: none;
    }
}

