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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header { background: linear-gradient(45deg, #ff6b6b, #4ecdc4); color: white; padding: 30px; text-align: center; }
.header h1 { font-size: 2em; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.header p { font-size: 1.2em; opacity: 0.9; }

.game-setup { padding: 20px; text-align: center; border-bottom: 2px solid #f0f0f0; }

.player-inputs { display: flex; gap: 20px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.player-input { display: flex; flex-direction: column; align-items: center; }
.player-input label { font-weight: bold; margin-bottom: 8px; color: #333; }
.player-input input {
    padding: 12px; border: 2px solid #ddd; border-radius: 10px; font-size: 16px;
    text-align: center; width: 200px; transition: all 0.3s ease;
}
.player-input input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 10px rgba(102,126,234,0.3); }

.start-btn {
    background: linear-gradient(45deg, #667eea, #764ba2); color: white; border: none;
    padding: 15px 30px; border-radius: 25px; font-size: 18px; cursor: pointer;
    transition: all 0.3s ease; margin-top: 20px;
}
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102,126,234,0.4); }

.game-board { padding: 15px; display: none; }

.score-table {
    width: 100%; border-collapse: collapse; margin-bottom: 30px; background: white;
    border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.score-table th {
    background: linear-gradient(45deg, #667eea, #764ba2); color: white; padding: 20px;
    font-size: 1.3em; text-align: center;
}
.score-table td { padding: 15px; text-align: center; border-bottom: 1px solid #f0f0f0; font-size: 1.1em; }

.score-input {
    width: 100px; padding: 12px 8px; border: 2px solid #ddd; border-radius: 8px;
    text-align: center; font-size: 18px; transition: all 0.3s ease;
    -webkit-appearance: none; -moz-appearance: textfield;
}
.score-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 8px rgba(102,126,234,0.3); }
.score-input:disabled { background-color: #f8f9fa; color: #6c757d; border-color: #dee2e6; cursor: not-allowed; }

.total-row { background: linear-gradient(45deg, #f8f9fa, #e9ecef); font-weight: bold; font-size: 1.2em; }
.total-score { font-size: 1.3em; font-weight: bold; }
.winner { color: #28a745; }
.loser { color: #dc3545; font-weight: bold; }

.controls { display: flex; gap: 15px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.btn { padding: 12px 25px; border: none; border-radius: 25px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; font-weight: bold; }
.btn-add { background: linear-gradient(45deg, #28a745, #20c997); color: white; }
.btn-reset { background: linear-gradient(45deg, #dc3545, #e74c3c); color: white; }
.btn-new { background: linear-gradient(45deg, #ffc107, #ff9800); color: white; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

.game-status { text-align: center; margin: 20px 0; padding: 15px; border-radius: 10px; font-size: 1.2em; font-weight: bold; }
.game-won { background: linear-gradient(45deg, #d4edda, #c3e6cb); color: #155724; border: 2px solid #28a745; }

@media (max-width: 600px) {
    .container { margin: 5px; border-radius: 15px; }
    .header { padding: 20px 15px; }
    .header h1 { font-size: 1.8em; }
    .player-inputs { flex-direction: column; align-items: center; gap: 15px; }
    .player-input input { width: 280px; font-size: 16px; padding: 15px; }
    .score-table { font-size: 16px; }
    .score-table th { padding: 15px 10px; font-size: 1.1em; }
    .score-table td { padding: 12px 8px; }
    .score-input { width: 90px; font-size: 18px; padding: 12px 6px; }
    .total-score { font-size: 1.4em; }
    .controls { flex-direction: column; align-items: center; gap: 10px; }
    .btn { width: 250px; font-size: 16px; padding: 15px 25px; }
    .start-btn { font-size: 18px; padding: 18px 35px; }
}
