/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Gestion des écrans */
.screen {
    display: none;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* Écran de menu */
.menu-content {
    padding: 60px 40px;
    text-align: center;
}

.game-title {
    font-size: 3rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-description {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 40px;
    line-height: 1.6;
}

.game-rules {
    margin-top: 40px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.game-rules h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.game-rules ul {
    list-style: none;
    padding: 0;
}

.game-rules li {
    padding: 8px 0;
    color: #718096;
    position: relative;
    padding-left: 25px;
}

.game-rules li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

/* Boutons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

/* Écran de jeu */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
}

.game-content {
    padding: 40px;
}

.car-image-container {
    text-align: center;
    margin-bottom: 40px;
}

.car-image {
    width: auto;
    height: auto;
    min-width: 480px;
    min-height: 360px;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.car-image:hover {
    transform: scale(1.02);
}

.question-section {
    text-align: center;
    margin-bottom: 30px;
}

.question-section h2 {
    font-size: 1.8rem;
    color: #4a5568;
    margin-bottom: 30px;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    align-items: center;
}

.answer-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Feedback */
.feedback {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    animation: slideIn 0.3s ease;
}

.feedback.correct {
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #9ae6b4;
}

.feedback.incorrect {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #feb2b2;
}

.feedback.hidden {
    display: none;
}

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

/* Écran de fin de partie */
.game-over-content {
    padding: 60px 40px;
    text-align: center;
}

.game-over-content h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 40px;
    font-weight: 700;
}

.final-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.final-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-stat-label {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 10px;
    font-weight: 500;
}

.final-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.game-over-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Section O2switch */
.o2switch-section {
    margin-top: 40px;
    text-align: center;
}

.o2switch-logo {
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.o2switch-logo:hover {
    transform: scale(1.05);
}

/* Section Instagram */
.instagram-section {
    margin-top: 20px;
    text-align: center;
}

.powered-by {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
    font-weight: 500;
}

.instagram-logo {
    max-width: 40px;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.instagram-logo:hover {
    transform: scale(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .menu-content {
        padding: 40px 20px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-content {
        padding: 20px;
    }
    
    .game-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .final-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .game-over-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Adaptation des images pour mobile */
    .car-image {
        min-width: 300px;
        min-height: 225px;
        max-width: 100%;
        max-height: 50vh;
    }
    
    .o2switch-logo {
        max-width: 200px;
    }
    
    .instagram-logo {
        max-width: 35px;
    }
}

/* Animations supplémentaires */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stat-value {
    animation: pulse 2s infinite;
}

/* Effet de survol pour les images */
.car-image-container {
    position: relative;
    overflow: hidden;
}

.car-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.car-image-container:hover::after {
    left: 100%;
}
