/* Styles pour Devinez le Nombre - Style cohérent avec le site */

body {
    background: linear-gradient(135deg, #1b1a1f 0%, #2d2a34 100%);
    color: #ffffff;
    min-height: 100vh;
}

.game-container-guess {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 182, 65, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.subtitle {
    font-size: 1.1rem;
    color: #b1b1b1;
    margin-bottom: 1.5rem;
}

.game-stats-header {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-box {
    background: rgba(255, 182, 65, 0.1);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 182, 65, 0.3);
    text-align: center;
    min-width: 120px;
}

.stat-label {
    font-size: 0.9rem;
    color: #b1b1b1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffb641;
}

.game-board {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.game-status {
    text-align: center;
    margin-bottom: 2rem;
}

.status-message {
    font-size: 1.3rem;
    color: #ffb641;
    padding: 1rem;
    background: rgba(255, 182, 65, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 182, 65, 0.3);
}

/* Sélecteur de difficulté */
.difficulty-selector {
    text-align: center;
}

.difficulty-selector h3 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.difficulty-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.difficulty-btn:hover {
    transform: translateY(-3px);
    background: rgba(255, 182, 65, 0.1);
    border-color: rgba(255, 182, 65, 0.3);
    box-shadow: 0 8px 25px rgba(255, 182, 65, 0.2);
}

.difficulty-btn.active {
    background: rgba(255, 182, 65, 0.15);
    border-color: rgba(255, 182, 65, 0.5);
    box-shadow: 0 4px 15px rgba(255, 182, 65, 0.3);
}

.difficulty-icon {
    font-size: 2.5rem;
}

.difficulty-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
}

.difficulty-range {
    font-size: 0.9rem;
    color: #b1b1b1;
}

.btn-start-game {
    background: linear-gradient(135deg, #ffb641, #ff9500);
    color: #1b1a1f;
    border: none;
    padding: 1rem 3rem;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 182, 65, 0.3);
}

.btn-start-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 65, 0.5);
}

/* Zone de jeu */
.game-play {
    animation: fadeIn 0.5s ease;
}

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

.range-display {
    background: rgba(255, 182, 65, 0.1);
    border: 1px solid rgba(255, 182, 65, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.range-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.range-info span:first-child {
    color: #b1b1b1;
}

.range-values {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffb641;
}

.guess-input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.guess-input {
    flex: 1;
    max-width: 300px;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid rgba(255, 182, 65, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: bold;
    transition: all 0.3s ease;
}

.guess-input:focus {
    outline: none;
    border-color: rgba(255, 182, 65, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 182, 65, 0.3);
}

.guess-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Remove spinner arrows in number input */
.guess-input::-webkit-outer-spin-button,
.guess-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.guess-input[type=number] {
    -moz-appearance: textfield;
}

.btn-guess {
    background: linear-gradient(135deg, #ffb641, #ff9500);
    color: #1b1a1f;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 182, 65, 0.3);
}

.btn-guess:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 65, 0.5);
}

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

/* Section des indices */
.hints-section {
    margin-bottom: 2rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hint-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

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

.hint-too-low {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.3);
    color: #48bb78;
}

.hint-too-high {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    color: #f56565;
}

.hint-correct {
    background: rgba(255, 182, 65, 0.2);
    border: 1px solid rgba(255, 182, 65, 0.5);
    color: #ffb641;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Historique */
.guesses-history {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.guesses-history h4 {
    color: #ffb641;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-item {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.history-item.too-low {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.3);
    color: #48bb78;
}

.history-item.too-high {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    color: #f56565;
}

/* Règles du jeu */
.game-rules {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-rules h3 {
    color: #ffb641;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.game-rules li {
    padding: 0.7rem 0;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.6;
}

/* Modal de victoire */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(27, 26, 31, 0.98) 0%, rgba(45, 42, 52, 0.98) 100%);
    border: 1px solid rgba(255, 182, 65, 0.3);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.modal-content h2 {
    color: #ffb641;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.modal-content > p {
    color: #b1b1b1;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.victory-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.victory-stat {
    background: rgba(255, 182, 65, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 182, 65, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.victory-stat-label {
    font-size: 0.85rem;
    color: #b1b1b1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.victory-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffb641;
}

.btn-new-game {
    background: linear-gradient(135deg, #ffb641, #ff9500);
    color: #1b1a1f;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 182, 65, 0.3);
}

.btn-new-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 65, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .game-container-guess {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .game-header {
        padding: 1.5rem;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .game-stats-header {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-box {
        padding: 0.8rem 1.5rem;
    }

    .difficulty-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .guess-input-section {
        flex-direction: column;
    }

    .guess-input {
        max-width: 100%;
    }

    .victory-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.8rem;
    }

    .difficulty-buttons {
        grid-template-columns: 1fr;
    }

    .modal-icon {
        font-size: 3.5rem;
    }

    .modal-content h2 {
        font-size: 2rem;
    }
}
