/* Wedding Runner Game Styles */

/* Variables pour cohérence avec le site principal */
:root {
    --primary-bg: #faf6ef;
    --text-color: #646464;
    --text-dark: #000;
    --accent-color: #828282;
    --white: #fff;
    --game-bg: #e8dcc6;
    --ground-color: #d4c5a9;
    --obstacle-color: #8b4513;
    --couple-color: #ff69b4;
}

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

body {
    font-family: "Work Sans", Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

#game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-family: "Sacramento", cursive;
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.game-subtitle {
    font-family: "Engagement", cursive;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Game Area */
#game-area {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: var(--game-bg);
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(to bottom, #87ceeb 0%, #87ceeb 60%, var(--ground-color) 60%);
}

/* Game UI Overlay */
#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#score, #high-score {
    position: absolute;
    top: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

#score {
    left: 20px;
}

#high-score {
    right: 20px;
}

/* Game Screens */
.game-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    pointer-events: auto;
}

.game-screen h2 {
    font-family: "Sacramento", cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.game-screen p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.controls-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.controls-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.game-btn {
    font-family: "Work Sans", Arial, sans-serif;
    background: var(--text-dark);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.game-btn:active {
    transform: translateY(0);
}

/* Jump Button for Mobile */
.jump-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    background: var(--text-dark);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    z-index: 100;
}

.jump-button:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.jump-button:active {
    transform: scale(0.95);
    background: #333;
}

/* Instructions */
.instructions {
    margin: 40px 0;
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    font-family: "Sacramento", cursive;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.instructions ul {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.instructions li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid #eee;
}

.instructions li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 8px;
}

.instructions li:last-child {
    border-bottom: none;
}

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 30px;
}

.back-btn {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-btn:hover {
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

#new-record {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #game-container {
        padding: 10px;
    }
    
    .game-title {
        font-size: 2.2rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
    }
    
    #gameCanvas {
        height: 250px;
    }
    
    .game-screen {
        padding: 25px;
        max-width: 95%;
    }
    
    .game-screen h2 {
        font-size: 2rem;
    }
    
    .jump-button {
        width: 70px;
        height: 70px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
    
    #score, #high-score {
        font-size: 0.9rem;
        padding: 6px 12px;
        top: 15px;
    }
    
    #score {
        left: 15px;
    }
    
    #high-score {
        right: 15px;
    }
    
    .instructions {
        padding: 20px;
    }
    
    .instructions h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-screen {
        padding: 20px;
    }
    
    .game-screen h2 {
        font-size: 1.7rem;
    }
    
    .controls-info {
        padding: 15px;
    }
    
    .jump-button {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }
}

/* Animation pour le score */
@keyframes scoreIncrease {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-animation {
    animation: scoreIncrease 0.3s ease;
}

/* Animation pour le record */
@keyframes newRecord {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.05); }
}

.new-record-animation {
    animation: newRecord 0.6s ease;
}
