/* ===================================
   CLUEDO - SYSTÈME DE DESIGN MODERNE
   =================================== */

/* Variables CSS pour cohérence */
:root {
    /* Couleurs principales */
    --primary-color: #8B0000;
    --secondary-color: #DAA520;
    --accent-color: #2C5F2D;
    --success-color: #28a745;
    --error-color: #dc3545;

    /* Couleurs de fond */
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-dark: rgba(0, 0, 0, 0.5);

    /* Typographie */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-title: 'Georgia', serif;

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Bordures */
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(218, 165, 32, 0.5);
}

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

body {
    font-family: var(--font-main);
    color: #fff;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Container principal avec glassmorphism */
.game-container {
    max-width: 900px;
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-xl);
    background: var(--bg-glass-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease-in;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Titres */
h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--secondary-color);
}

/* Navigation entre pièces */
.navigation {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.navigation p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.navigation button,
.navigation .btn {
    display: inline-block;
    margin: var(--spacing-xs);
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #a52a2a);
    color: white;
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.navigation button:hover,
.navigation .btn:hover {
    background: linear-gradient(135deg, #a52a2a, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.navigation button:active {
    transform: translateY(0);
}

/* Formulaires d'hypothèse */
.actions {
    background: var(--bg-glass);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: var(--spacing-lg);
}

.actions p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    text-align: center;
}

.actions form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.actions label {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    display: block;
    color: var(--secondary-color);
}

.actions select {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.actions select:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
}

.actions select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

.actions button[type="submit"] {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #3a7f3c);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: var(--spacing-sm);
}

.actions button[type="submit"]:hover {
    background: linear-gradient(135deg, #3a7f3c, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.actions button[type="submit"]:active {
    transform: translateY(0);
}

/* Boutons génériques */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    margin: var(--spacing-xs);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #a52a2a);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a52a2a, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: linear-gradient(135deg, #555, #777);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #777, #555);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), #3a7f3c);
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2rem;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #3a7f3c, var(--accent-color));
}

/* Hypothesis button container */
.hypothesis-button-container {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

/* Modal form improvements */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.modal-content label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-xs);
}

.modal-content select {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-content select:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
}

.modal-content select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

.modal-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-md);
}

/* Modal pour les règles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-glass-dark);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    border: 2px solid var(--secondary-color);
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    margin-bottom: var(--spacing-md);
}

.modal-content ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.modal-content button {
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    background: #a52a2a;
    transform: translateY(-2px);
}

/* Page de résultats */
.result-container {
    text-align: center;
}

.result-message {
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
    font-size: 1.3rem;
    font-weight: 600;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid var(--success-color);
    color: #90EE90;
}

.result-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid var(--error-color);
    color: #FFB6C1;
}

.attempt-counter {
    margin: var(--spacing-md) 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.solution-reveal {
    background: var(--bg-glass);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
    border: 2px solid var(--secondary-color);
}

.solution-reveal h2 {
    margin-bottom: var(--spacing-md);
}

.solution-reveal p {
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        margin: var(--spacing-sm);
        padding: var(--spacing-md);
    }

    h1 {
        font-size: 2rem;
    }

    .navigation button,
    .btn {
        display: block;
        width: 100%;
        margin: var(--spacing-xs) 0;
    }

    .actions {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .game-container {
        padding: var(--spacing-sm);
    }

    .modal-content {
        padding: var(--spacing-md);
    }
}

/* Animations supplémentaires */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn-primary:hover {
    animation: pulse 1s infinite;
}