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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    text-align: center;
    padding: 20px;
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.setup-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    background: #f8f9fa;
}

.player-setup, .game-setup {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.players-header h4 {
    margin: 0;
}

.clear-names-btn {
    background: #ff9800;
    font-size: 14px;
    padding: 8px 15px;
}

.clear-names-btn:hover {
    background: #f57c00;
}

.player-setup h3, .game-setup h3 {
    color: #2E7D32;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.add-player {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    }
    
.add-player input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.add-player input:focus {
    outline: none;
    border-color: #4CAF50;
}

button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #45a049;
}

.reset-btn {
    background: #f44336;
}

.reset-btn:hover {
    background: #da190b;
}

.players-list ul {
    list-style: none;
}

.players-list li {
    background: #e8f5e8;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-player {
    background: #f44336;
    padding: 5px 10px;
    font-size: 12px;
}

.remove-player:hover {
    background: #da190b;
}

.game-setup label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.game-setup select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.scorecard {
    padding: 30px;
}

.scorecard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scorecard-header h2 {
    color: #2E7D32;
    font-size: 2rem;
}

.scorecard-buttons {
    display: flex;
    gap: 10px;
}

.back-btn {
    background: #2196F3;
}

.back-btn:hover {
    background: #1976D2;
}
    
.scorecard-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 15px 10px;
    text-align: center;
    border: 1px solid #ddd;
}

th {
    background: #4CAF50;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hole-header {
    background: #2E7D32 !important;
}

tbody tr:nth-child(even) {
    background: #f8f9fa;
}

tbody tr:hover {
    background: #e8f5e8;
}

.score-input {
    width: 60px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}

.score-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.par-input {
    width: 60px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
    background-color: #fff3cd;
    border-color: #ffc107;
}

.par-input:focus {
    outline: none;
    border-color: #e0a800;
}

tfoot td {
    background: #2E7D32;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.summary {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.summary h3 {
    color: #2E7D32;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.results-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.winner {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    font-weight: bold;
}

@media (max-width: 768px) {
    .setup-section {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .add-player {
        flex-direction: column;
    }
    
    .scorecard-header {
        flex-direction: column;
        gap: 15px;
    }
}

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

@media (max-width: 320px) {
    header h1 {
        font-size: 1.3rem;
        line-height: 1.2;
    }
}

