/* Styles pour le shortcode Game Found Player Club */

.game-found-player-club-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.game-found-player-club-container h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Grille des cartes de jeu */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.game-card-content h4 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.game-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.play-game-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.play-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
}

/* Modal/Popup */
.game-modal {
    display: none;
    max-width: inherit;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in;
    overflow-y: auto; /* Permet le scroll vertical */
    overflow-x: hidden; /* Empêche le scroll horizontal */
}

.game-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    position: relative;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    max-height: 85vh; /* Limite la hauteur à 85% de la hauteur de l'écran */
    overflow-y: auto; /* Permet le scroll dans le contenu de la modale */
}

.quiz-radio span {
    color: #000000;
}

/* Radios stylisées type HD Quiz */
.quiz-radios {
    display: grid;
    gap: 10px;
}

.quiz-radio.hdq-like {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}


.quiz-radio.hdq-like .quiz-radio-label {
    color: #111827;
    font-weight: 600;
}

/* Feedback de validation */
.quiz-radio.hdq-like.shake { animation: shake 0.6s ease-in-out; }
.quiz-radio.hdq-like.bounce { animation: bounce 0.8s ease-in-out; }

.game-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    transition: color 0.3s ease;
}

.game-modal-close:hover,
.game-modal-close:focus {
    color: #ffd700;
}

/* Contenu de la modal */
.game-modal-content h3 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.game-hints-section h4 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.hints-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hint {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid #ffd700;
    transition: all 0.3s ease;
}

.hint:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.hint-label {
    font-weight: 600;
    color: #ffd700;
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hint-text {
    font-size: 1rem;
    line-height: 1.4;
}

.hint-low {
    border-left-color: #4CAF50 !important;
}

.hint-medium {
    border-left-color: #FF9800 !important;
}

.hint-high {
    border-left-color: #F44336 !important;
}

/* Boutons de la modal */
.show-next-hint-btn,
.show-answer-btn,
.hide-answer-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.show-next-hint-btn:hover,
.show-answer-btn:hover,
.hide-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
}

.game-controls {
    text-align: center;
    margin-top: 1.5rem;
}

.game-answer-section {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.game-answer-section h4 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.answer-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4CAF50;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .game-found-player-club-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .game-found-player-club-container h3 {
        font-size: 1.5rem;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-card {
        padding: 1rem;
    }
    
    .game-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .play-game-btn,
    .show-next-hint-btn,
    .show-answer-btn,
    .hide-answer-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Styles pour les thèmes alternatifs */
.game-found-player-club-container[data-style="dark"] {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.game-found-player-club-container[data-style="light"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.game-found-player-club-container[data-style="sport"] {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Styles pour le formulaire de quiz */
.game-quiz-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.game-quiz-section h4 {
    color: var(--wp--preset--color--main);
}

.quiz-form {
    margin-top: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.player-answer-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    display: none; /* Masquer le champ input */
}

.player-answer-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.player-answer-input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.attempts-counter {
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
}

.attempts-text {
    font-weight: 500;
}

.attempts-left {
    color: #007cba;
    font-weight: bold;
}

.submit-answer-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-answer-btn:hover {
    background: #005a87;
}

.submit-answer-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.quiz-feedback {
    margin-top: 5px;
    padding: 2px;
    border-radius: 6px;
}

.feedback-message {
    font-weight: 500;
    margin-bottom: 10px;
}

.quiz-feedback .feedback-message.success {
    color: #155724;
    border-left-color: #28a745;
    background: #d4edda;
}

.quiz-feedback .feedback-message.error {
    color: #721c24;
    border-left-color: #dc3545;
    background: #f8d7da;
}

.correct-answer {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

.correct-answer h5 {
    margin: 0 0 10px 0;
    color: #856404;
}

.reset-quiz-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

/* Spinner et animations de chargement */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.image-flouter-container canvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.image-flouter-container {
    text-align: center;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation de pulsation pour le bouton en cours de chargement */
.submit-answer-btn.loading {
    background: #6c757d;
    position: relative;
    overflow: hidden;
}

.submit-answer-btn.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Animation de fade pour le feedback */
.quiz-feedback {
    margin-top: 5px;
    padding: 2px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.quiz-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* Animation de shake pour les erreurs */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/* Animation de bounce pour les succès */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0, -8px, 0); }
    70% { transform: translate3d(0, -4px, 0); }
    90% { transform: translate3d(0, -2px, 0); }
}

.bounce {
    animation: bounce 0.8s ease-in-out;
}

/* Overlay de chargement pour la modale */
.modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffd700;
    animation: spin 1s ease-in-out infinite;
}

.modal-loading-text {
    color: white;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .player-answer-input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .submit-answer-btn {
        width: 100%;
        margin-top: 10px;
    }

    .game-modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh; /* Plus d'espace sur mobile */
    }
    
    .game-modal {
        padding: 10px; /* Ajoute un peu d'espace autour de la modale */
    }

    .loading-spinner {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }
    
    .modal-loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .image-flouter-container canvas {
        width: 100%;
    }
}