/* Styles généraux */
body {
    background: url('src/valentine-background.gif') no-repeat center center fixed;
    background-size: cover;
    color: #000;
    font-family: 'Arial', sans-serif;
    text-align: center;
    transition: background 0.5s ease-in-out;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* En-tête du jeu */
.valentine-header {
    padding: 50px 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    max-width: 600px;
    border: 3px solid #ff66cc;
    animation: fadeIn 1s ease-in-out;
}

#gameLogo {
    max-width: 100%;
    height: auto;
    border-bottom: 3px solid #ff66cc;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    }
}

/* Boutons */
.start-button {
    background-color: #ff0066;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite alternate;
}

.start-button:hover {
    transform: scale(1.1);
    background-color: #ff1a75;
    box-shadow: 0 5px 15px rgba(255, 0, 102, 0.5);
}

/* Zone de jeu */
.game-area {
    max-width: 800px;
    margin: 0 auto;
}

.question-section {
    background-color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.question-section:hover {
    transform: translateY(-5px);
}

/* Réponses */
.answers button {
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin: 10px 0;
    padding: 15px;
}

.answers button:hover:not([disabled]) {
    transform: translateX(10px);
    background-color: #ff66cc;
    color: white;
    border-color: #ff66cc;
}

/* Score final */
.circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.5s ease-in-out;
}

.circle.green {
    border-color: #28a745;
    color: #28a745;
    transform: scale(1.1);
    animation: glow 1.5s infinite alternate;
}

.circle.red {
    border-color: #dc3545;
    color: #dc3545;
    transform: scale(0.9);
}

/* Liste des réponses */
.answer-history-item {
    background-color: #f8f9fa;
    border: 1px solid #ff66cc;
    transition: all 0.3s ease;
}

.answer-history-item:hover {
    background-color: #ffe6f2;
    transform: translateX(10px);
}

/* Messages de réponse */
.response-message {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 10px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Barre de progression */
.progress {
    height: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}

.progress-bar {
    transition: width 0.3s ease;
    background-color: #ff66cc;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.9);
    backdrop-filter: blur(5px);
    color: white;
    padding: 15px 0;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .valentine-header {
        margin: 10px;
        padding: 30px 15px;
    }

    .start-button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .circle {
        width: 120px;
        height: 120px;
        font-size: 20px;
    }

    .answers button {
        font-size: 1rem;
        padding: 10px;
    }

    .response-message {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
}

/* Timer styles */
.game-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.timer-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
    color: #ff66cc;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 102, 204, 0.3);
}

.timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 102, 204, 0.2);
}

.timer-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(#ff66cc 0%, transparent 0%);
    transition: background 0.1s linear;
}

.timer-warning {
    color: #ff3333;
    animation: pulse 0.5s infinite alternate;
}

/* Score animation styles */
.score-animation-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.circle {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    font-size: 2rem;
    font-weight: bold;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.5);
}

.circle.animate {
    opacity: 1;
    transform: scale(1);
}

.circle.green {
    border-color: #28a745;
    color: #28a745;
    box-shadow: 0 0 30px rgba(40, 167, 69, 0.3);
    animation: successPulse 2s infinite;
}

.circle.red {
    border-color: #dc3545;
    color: #dc3545;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.3);
    animation: failurePulse 2s infinite;
}

@keyframes successPulse {
    0% { transform: scale(1); box-shadow: 0 0 30px rgba(40, 167, 69, 0.3); }
    50% { transform: scale(1.1); box-shadow: 0 0 50px rgba(40, 167, 69, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 30px rgba(40, 167, 69, 0.3); }
}

@keyframes failurePulse {
    0% { transform: scale(1); box-shadow: 0 0 30px rgba(220, 53, 69, 0.3); }
    50% { transform: scale(0.95); box-shadow: 0 0 50px rgba(220, 53, 69, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 30px rgba(220, 53, 69, 0.3); }
}

/* Confetti animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ff66cc;
    opacity: 0;
    animation: confettiFall 3s ease-in-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(1000%) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timer-container {
        width: 80px;
        height: 80px;
    }

    .timer {
        font-size: 1.5rem;
    }

    .circle {
        width: 120px;
        height: 120px;
        font-size: 1.5rem;
    }

    .sound-button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}