#fs-app {
    max-width: 560px;
    margin: 20px auto;
    text-align: center;
}

.fs-back-link {
    max-width: 560px;
    margin: 10px auto 20px;
    text-align: center;
}

.fs-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.fs-intro {
    margin: 0;
    color: #555;
}

.fs-game-summary {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* Boutons génériques */
#fs-app button {
    font-weight: bold;
    padding: 12px 24px;
    margin: 4px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 44px;
}

#fs-app button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#fs-app button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#fs-app button:disabled {
    background-color: #bdc5cc;
    cursor: not-allowed;
}

.fs-btn-secondary {
    background: none !important;
    color: #3498db !important;
    text-decoration: underline;
    box-shadow: none !important;
}

/* Écran de configuration : niveau, manches, joueurs */
.fs-screen h2 {
    margin: 6px 0 0;
    font-size: 18px;
}

.fs-choice-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#fs-app .fs-choice-buttons button {
    background-color: #fff;
    color: #3498db;
    border: 2px solid #3498db;
    box-shadow: none;
}

#fs-app .fs-choice-buttons button:hover:not(.selected):not(:disabled) {
    background-color: #eaf4fc;
    transform: none;
    box-shadow: none;
}

#fs-app .fs-choice-buttons button.selected {
    background-color: #3498db;
    color: #fff;
}

#fs-app .fs-choice-buttons button.selected:hover {
    background-color: #2980b9;
}

.fs-setup-divider {
    width: 100%;
    max-width: 300px;
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
}

#fs-setup-continue {
    margin-top: 10px;
}

/* Écran : saisie des noms */
.fs-name-inputs {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fs-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 8px 12px;
}

.fs-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fs-name-input {
    flex: 1;
    border: none;
    font-size: 16px;
    padding: 6px;
    min-width: 0;
}

.fs-name-input:focus {
    outline: 2px solid #3498db;
    border-radius: 4px;
}

/* Badge joueur */
.fs-player-badge {
    display: inline-block;
    color: #fff;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
}

/* HUD pendant une manche */
.fs-hud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.fs-player-chip {
    color: #fff;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 20px;
}

.fs-round-indicator,
.fs-level-indicator {
    background-color: #f1f1f1;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
}

.fs-countdown {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
    color: var(--fs-color, #3498db);
}

/* Slider */
.fs-slider-wrap {
    width: 100%;
    max-width: 400px;
    transition: opacity 0.3s ease;
}

.fs-slider-wrap.fs-locked {
    opacity: 0.35;
    pointer-events: none;
}

.fs-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#fs-app .fs-slider-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 18px;
    min-height: 40px;
    min-width: 40px;
}

.fs-slider-row input[type="range"] {
    flex: 1;
}

.fs-slider-wrap input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #34495e, #85c1e9, #f1c40f);
    cursor: pointer;
}

.fs-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--fs-color, #3498db);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.fs-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--fs-color, #3498db);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.fs-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* Résultat de manche */
.fs-score-big {
    font-size: 42px;
    font-weight: bold;
    color: #2ecc71;
    margin: 6px 0;
}

.fs-result-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background-color: #f7f7f7;
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
    max-width: 420px;
}

.fs-result-row p {
    margin: 0;
}

/* Récap joueur / classement final */
.fs-rounds-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 300px;
}

.fs-rounds-list li {
    background-color: #f1f1f1;
    border-radius: 5px;
    padding: 6px 12px;
    margin: 4px 0;
}

.fs-leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 420px;
}

.fs-leaderboard li {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px;
    text-align: left;
}

.fs-rank {
    font-size: 20px;
    width: 28px;
    flex-shrink: 0;
}

.fs-lb-name {
    font-weight: bold;
    flex: 1;
}

.fs-lb-score {
    font-weight: bold;
}

.fs-lb-rating {
    font-size: 14px;
    color: #666;
    width: 100%;
}

/* Responsive design pour mobile */
@media (max-width: 600px) {
    #fs-app button {
        padding: 10px 18px;
        font-size: 14px;
    }

    .fs-score-big {
        font-size: 34px;
    }
}
