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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1614 0%, #3d2817 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.add-player {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.add-player input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #C5A572;
    color: #1a1614;
    font-weight: 700;
}

.btn-primary:active {
    transform: scale(0.95);
    background: #D4AF37;
}

.btn-danger {
    background: #8B0000;
    color: white;
}

.btn-danger:active {
    transform: scale(0.95);
    background: #A52A2A;
}

.players-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.player-tag {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.player-tag button {
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 10px;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

th {
    background: #1a1614;
    color: #D4AF37;
    padding: 6px 2px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #C5A572;
}

th.round-col {
    width: 35px;
    min-width: 35px;
    position: sticky;
    left: 0;
    z-index: 20;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

th.player-col {
    min-width: 80px;
    padding: 6px 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

td {
    padding: 4px 2px;
    border: 2px solid #e0e0e0;
}

td.round-number {
    font-weight: bold;
    background: #f8f9fa;
    text-align: center;
    font-size: 11px;
    width: 35px;
    position: sticky;
    left: 0;
    z-index: 15;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

td.total-row {
    font-weight: bold;
    background: #C5A572;
    color: #1a1614;
    text-align: center;
    font-size: 13px;
    padding: 8px 2px;
}

td.total-row:first-child {
    position: sticky;
    left: 0;
    z-index: 15;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.player-cell {
    text-align: center;
    padding: 3px !important;
}

.round-inputs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
}

.score-input-wrapper {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.score-input {
    width: 45px;
    height: 28px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    -moz-appearance: textfield;
}

/* Masquer les spinners */
.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dead-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.dead-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    font-size: 18px;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.dead-checkbox input[type="checkbox"]:checked + .checkbox-label {
    opacity: 1;
}

.round-score {
    font-weight: 700;
    color: #C5A572;
    margin-top: 2px;
    font-size: 16px;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

.mode-toggle {
    background: white;
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 10px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: #C5A572;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

.score-input:disabled {
    background: #f5f5f5;
    color: #666;
}
