/* Variables CSS */
:root {
    --primary-color: #e63946;
    --secondary-color: #f1faee;
    --key-press-color: rgba(69, 123, 157, 0.55);
    --correct-color: #e63946;
    --misplaced-color: #f4a261;
    --absent-color: #457b9d;
    --background: #1d3557;
    --text-color: #f1faee;
    --card-bg: #457b9d;
    --input-bg: #f1faee;
    --success-color: #06d6a0;
    --error-color: #ef476f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #2a5177 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Logo TUSMO */
.tusmo-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-bottom: 20px;
}

.logo-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--correct-color);
    color: #fff;
    font-size: 2.2rem;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.10);
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--misplaced-color);
    color: #fff;
    font-size: 2.2rem;
    font-weight: bold;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.10);
}

.logo-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.10);
}

/* Animation pour dynamiser le logo */
.logo-animate {
    animation: vibrate 0.5s ease-in-out;
}

@media (max-width: 480px) {
    .tusmo-logo {
        gap: 6px;
    }
    .logo-square, .logo-letter, .logo-circle {
        font-size: 1.2rem;
        width: 32px;
        height: 32px;
    }
}

/* Header Bar */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 10px;
}

.header-logo-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    color: var(--background);
    font-size: 2.2rem;
    cursor: pointer;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, box-shadow 0.2s;
    z-index: 2;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 48px;
    height: 48px;
}

.home-btn:focus {
    outline: none;
    color: var(--background);
    box-shadow: 0 0 0 2px var(--background);
}

.home-btn:hover {
    color: #457b9d;
    box-shadow: 0 4px 16px rgba(69,123,157,0.15);
}

.home-icon {
    font-size: 1.7rem;
    line-height: 1;
    color: var(--background);
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

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

/* Start Screen */
.start-content {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.start-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.game-modes {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    margin: 30px 0;
}

.btn-mode {
    background: white;
    color: var(--background);
    padding: 20px 25px;
    font-size: 1.3rem;
    border-radius: 25px;
    min-width: 400px;
    min-height: 70px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    justify-items: center;
    gap: 15px;
    border: 3px solid transparent;
    position: relative;
    overflow: visible;
}

/* Aligner la coche à gauche */
.mode-checkbox {
    grid-column: 1;
    justify-self: center;
}

/* Centrer le texte */
.mode-label {
    grid-column: 2;
    text-align: center;
}

/* Aligner le streak à droite */
.streak-badge {
    grid-column: 3;
    justify-self: center;
}

/* Aligner le dé à gauche */
.dice-icon {
    grid-column: 1;
    justify-self: center;
}

/* Style pour l'icône du dé */
.dice-icon {
    color: #90EE90;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 0;
}

.btn-mode.pending::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 3px dashed;
    border-radius: 31px;
    pointer-events: none;
    background-size: 15px 15px;
    background-position: 0 0;
}

#daily-word-btn.pending::after {
    border-color: #87CEEB;
    animation: dashed-animation-blue 20s linear infinite;
}

#daily-suite-btn.pending::after {
    border-color: #FFB6C1;
    animation: dashed-animation-pink 20s linear infinite;
}

@keyframes dashed-animation-blue {
    0% {
        border-color: #87CEEB;
        box-shadow: 0 0 0 0 rgba(135, 206, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.3);
    }
    100% {
        border-color: #87CEEB;
        box-shadow: 0 0 0 0 rgba(135, 206, 235, 0.3);
    }
}

@keyframes dashed-animation-pink {
    0% {
        border-color: #FFB6C1;
        box-shadow: 0 0 0 0 rgba(255, 182, 193, 0.3);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.3);
    }
    100% {
        border-color: #FFB6C1;
        box-shadow: 0 0 0 0 rgba(255, 182, 193, 0.3);
    }
}

.btn-mode.pending {
    animation: border-tour 3s linear infinite;
}

#daily-word-btn.pending {
    animation: border-tour-blue 3s linear infinite;
}

#daily-suite-btn.pending {
    animation: border-tour-pink 3s linear infinite;
}

@keyframes border-tour-blue {
    0% {
        border-color: #87CEEB;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    }
    25% {
        border-color: #87CEEB;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3), 5px 5px 15px rgba(135, 206, 235, 0.5);
    }
    50% {
        border-color: #87CEEB;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3), -5px 5px 15px rgba(135, 206, 235, 0.5);
    }
    75% {
        border-color: #87CEEB;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3), 0px -5px 15px rgba(135, 206, 235, 0.5);
    }
    100% {
        border-color: #87CEEB;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    }
}

@keyframes border-tour-pink {
    0% {
        border-color: #FFB6C1;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    }
    25% {
        border-color: #FFB6C1;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3), 5px 5px 15px rgba(255, 182, 193, 0.5);
    }
    50% {
        border-color: #FFB6C1;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3), -5px 5px 15px rgba(255, 182, 193, 0.5);
    }
    75% {
        border-color: #FFB6C1;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3), 0px -5px 15px rgba(255, 182, 193, 0.5);
    }
    100% {
        border-color: #FFB6C1;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    }
}

.btn-mode:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
}


.mode-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #87CEEB;
    border-radius: 4px;
    position: relative;
    background: transparent;
    grid-column: 1;
    justify-self: center;
}

#daily-word-btn .mode-checkbox {
    border-color: #87CEEB;
}

#daily-suite-btn .mode-checkbox {
    border-color: #FFB6C1;
}

.mode-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    animation: checkShine 2s ease-in-out infinite;
}

.mode-checkbox:checked::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 4px;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: shine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes checkShine {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 0 25px rgba(255, 255, 255, 0.8);
    }
}

@keyframes vibrate {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    10% {
        transform: translate(-2px, -2px) rotate(-2deg);
    }
    20% {
        transform: translate(2px, -2px) rotate(2deg);
    }
    30% {
        transform: translate(-2px, 2px) rotate(-1deg);
    }
    40% {
        transform: translate(2px, 2px) rotate(1deg);
    }
    50% {
        transform: translate(-2px, -2px) rotate(-2deg);
    }
    60% {
        transform: translate(2px, -2px) rotate(2deg);
    }
    70% {
        transform: translate(-2px, 2px) rotate(-1deg);
    }
    80% {
        transform: translate(2px, 2px) rotate(1deg);
    }
    90% {
        transform: translate(-1px, -1px) rotate(-1deg);
    }
}

.logo-square.vibrating,
.logo-circle.vibrating {
    animation: vibrate 0.5s ease-in-out;
}

#daily-word-btn .mode-checkbox:checked {
    background-color: #87CEEB;
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.6);
}

#daily-suite-btn .mode-checkbox:checked {
    background-color: #FFB6C1;
    box-shadow: 0 0 10px rgba(255, 182, 193, 0.6);
}

#daily-word-btn .mode-checkbox:checked::after {
    color: white;
}

#daily-suite-btn .mode-checkbox:checked::after {
    color: white;
}

.mode-checkbox:disabled {
    cursor: not-allowed;
    opacity: 1;
    pointer-events: none;
}

.mode-label {
    flex: 1;
    text-align: center;
}

.streak-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.star-icon {
    font-size: 2rem;
    line-height: 1;
    position: absolute;
    color: #FFD700;
}

#daily-word-btn .star-icon {
    color: #87CEEB;
}

#daily-suite-btn .star-icon {
    color: #FFB6C1;
}

.streak-count {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--background);
    position: absolute;
    min-width: 20px;
    text-align: center;
    z-index: 1;
}

.rules {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.rules h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.rules ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.rules li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.letter {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    color: white;
}

.letter.correct {
    background-color: var(--correct-color);
}

.letter.misplaced {
    background-color: var(--misplaced-color);
}

.letter.absent {
    background-color: var(--absent-color);
}

.letter.misplaced-circle {
    background-color: var(--misplaced-color);
    border-radius: 50%;
    color: white;
    width: 60px;
    height: 60px;
    aspect-ratio: 1 / 1;
}

.guess-letter.correct {
    background-color: var(--correct-color);
    color: white;
}

.guess-letter.misplaced-circle {
    background-color: transparent;
    color: white;
    position: relative;
}

.guess-letter.misplaced-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 95%;
    background-color: var(--misplaced-color);
    border-radius: 50%;
    z-index: -1;
}

.guess-letter.misplaced {
    background-color: var(--misplaced-color);
    color: white;
}

.guess-letter.absent {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.3);
}

.guess-letter.placeholder {
    background-color: transparent;
    color: white;
}

.guess-letter.typing-color {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.guess-letter.typing {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    animation: pulse 0.3s ease;
}

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

.guess-letter.current {
    border-color: rgba(255, 255, 255, 0.8);
}

.settings {
    margin: 30px 0;
    text-align: center;
}

.settings label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.settings select {
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 10px;
    border: none;
    background: var(--input-bg);
    color: var(--background);
    cursor: pointer;
    min-width: 200px;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
    background: #d62839;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

.btn-secondary {
    background: var(--card-bg);
    color: white;
}

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

#share-btn {
    background: white;
    color: var(--background);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

#share-btn:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Game Screen */
.game-info {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-item {
    text-align: center;
}

.info-item .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.info-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Grille de jeu horizontale, chaque ligne = une tentative, chaque colonne = une lettre */
.guesses-container {
    display: block;
    padding: 0;
    border: 1px solid #fff;
    background: none;
    max-width: 100%;
    margin: 0 auto 30px;
    width: fit-content;
}

.guess-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    margin-bottom: 0;
}

.guess-letter {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 0;
    color: white;
    border: 1px solid #fff;
    background: transparent;
    transition: all 0.3s ease;
    animation: flip 0.5s ease-out;
}

/* Layout de jeu */
.game-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    margin: 0 auto 30px;
}

/* Keyboard */
.keyboard {
    margin: 30px auto;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    min-width: 45px;
    height: 55px;
    padding: 0 10px;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.key:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.key:active {
    transform: translateY(0);
}

.key.correct {
    background-color: var(--correct-color);
    border-color: var(--correct-color);
    color: white;
}

.key.misplaced {
    background-color: var(--misplaced-color);
    border-color: var(--misplaced-color);
    color: white;
}

.key.absent {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    opacity: 0.6;
}

.key.absent:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    opacity: 0.8;
}

.key.special {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: none;
    min-width: 90px; /* 2x la largeur d'une touche normale */
    height: 55px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key.special:active, .key.special:focus {
    background: none;
    outline: none;
}

.key.animated {
    animation: keypress 0.3s;
}

/* Animations spécifiques pour préserver les couleurs */
.key.correct.animated {
    animation: keypress-correct 0.3s;
}

.key.misplaced.animated {
    animation: keypress-misplaced 0.3s;
}

.key.absent.animated {
    animation: keypress-absent 0.3s;
}

@keyframes keypress {
    0% { transform: scale(1); background: rgba(255,255,255,0.2); }
    50% { transform: scale(1.2); background: var(--key-press-color); }
    100% { transform: scale(1); background: rgba(255,255,255,0.1); }
}

@keyframes keypress-correct {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 15px var(--correct-color); }
    100% { transform: scale(1); }
}

@keyframes keypress-misplaced {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 15px var(--misplaced-color); }
    100% { transform: scale(1); }
}

@keyframes keypress-absent {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 15px var(--absent-color); }
    100% { transform: scale(1); }
}

/* Error Message */
.error-message {
    text-align: center;
    color: var(--error-color);
    font-weight: bold;
    min-height: 30px;
    margin-bottom: 20px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Actions */
.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* End Screen */
.end-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

#result-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

#result-message {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.result-stats {
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.result-stats p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.result-word {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

.result-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.result-row {
    display: flex;
    gap: 0;
}

.result-letter {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 0;
    position: relative;
}

.result-letter.correct {
    background-color: var(--correct-color);
}

.result-letter.misplaced-circle {
    background-color: transparent;
}

.result-letter.misplaced-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 95%;
    background-color: var(--misplaced-color);
    border-radius: 50%;
    z-index: -1;
}

.result-letter.absent {
    background-color: transparent;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .start-content,
    .end-content {
        padding: 20px;
    }

    .guess-letter {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

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

    .key {
        min-width: 35px;
        height: 45px;
        font-size: 0.9rem;
        padding: 0 8px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .btn-mode {
        min-width: 320px;
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    .streak-badge {
        width: 35px;
        height: 35px;
    }

    .star-icon {
        font-size: 1.6rem;
    }

    .streak-count {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px 0;
    }

    .guesses-container {
        width: 100%;
        max-width: 100%;
        border-left: none;
        border-right: none;
        margin: 0 0 20px;
    }

    .guess-letter {
        width: calc((100vw - 10px) / 10);
        height: calc((100vw - 10px) / 10);
        font-size: 0.9rem;
        border: 1px solid #fff;
    }

    .keyboard {
        width: 100%;
        max-width: 100%;
        padding: 0 5px;
        margin: 20px 0;
        gap: 4px;
    }

    .key {
        min-width: calc((100vw - 70px) / 10);
        height: 40px;
        font-size: 0.8rem;
        padding: 0 3px;
    }

    .key.special {
        min-width: calc((100vw - 70px) / 10 * 1.5);
    }

    .keyboard-row {
        gap: 3px;
    }

    .game-info {
        flex-direction: column;
        gap: 15px;
    }

    .btn-mode {
        min-width: 280px;
        padding: 12px 15px;
        font-size: 1rem;
        gap: 10px;
    }

    .mode-checkbox {
        width: 20px;
        height: 20px;
    }

    .mode-label {
        font-size: 1rem;
    }

    .streak-badge {
        width: 32px;
        height: 32px;
    }

    .star-icon {
        font-size: 1.4rem;
    }

    .streak-count {
        font-size: 0.75rem;
    }

    .error-message {
        padding: 0 10px;
    }

    .suite-panel {
        padding: 10px 5px;
    }

    .suite-words {
        gap: 8px;
    }

    .suite-word {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 60px;
    }

    .suite-separator {
        font-size: 1rem;
    }
}

/* Masquer le bouton maison par défaut (sur l'écran d'accueil) */
.home-btn {
    display: none !important;
}

/* Afficher le bouton maison quand on est sur l'écran de jeu */
.home-btn.visible {
    display: flex !important;
}

/* Panneau Suite du Jour - Horizontal au-dessus de la grille */
.suite-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 15px 0;
    backdrop-filter: none;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.suite-panel.active {
    display: block;
    opacity: 1;
    animation: slideInDown 0.3s ease;
}

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

.suite-progress {
    font-size: 0.9rem;
    font-weight: bold;
    color: #FFB6C1;
    margin-bottom: 8px;
    text-align: center;
}

.suite-words {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.suite-separator {
    font-size: 1.2rem;
    color: #FFB6C1;
    opacity: 0.6;
    flex-shrink: 0;
}

.suite-word {
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #f1faee;
    font-size: 0.85rem;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    flex-shrink: 0;
}

.suite-word.current {
    background: rgba(255, 182, 193, 0.3);
    border: 2px solid #FFB6C1;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 182, 193, 0.3);
    animation: slideRight 0.5s ease-out;
}

.suite-word.completed {
    background: rgba(6, 214, 160, 0.2);
    border: 2px solid #06d6a0;
    color: #06d6a0;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(6, 214, 160, 0.3);
}

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

/* Récapitulatif de la suite du jour sur l'écran de fin */
.suite-recap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    justify-items: center;
    align-items: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.suite-grid-frame {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 182, 193, 0.5);
    border-radius: 12px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.suite-grid-title {
    font-size: 0.85rem;
    color: #FFB6C1;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}
