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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    background-color: #4CAF50;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

button {
    cursor: pointer;
}

/* Section Styles */
section {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

.active {
    display: block;
}

/* Button Styles */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    margin: 1rem 0;
    text-align: center;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.btn.secondary {
    background-color: #757575;
}

.btn.secondary:hover {
    background-color: #616161;
}

/* Counter styles */
.counter {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.counter-btn {
    width: 40px;
    height: 40px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#putts-taken {
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 1.2rem;
    margin: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Game Setup */
.handicap-selection {
    margin: 1.5rem 0;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.rules-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.rules-container ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Game Play */
.hole-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.score-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* Game Results */
.results-summary {
    background-color: #f1f8e9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4CAF50;
}

.results-summary p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.strokes-result {
    font-weight: bold;
    font-size: 1.2rem !important;
    margin-top: 1rem !important;
}

#results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

#results-table th, #results-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#results-table th {
    background-color: #e8f5e9;
    font-weight: bold;
}

/* History */
.history-item {
    background-color: #f1f8e9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #4CAF50;
}

.history-date {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.history-details {
    display: flex;
    justify-content: space-between;
}

.history-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}

.history-actions .btn {
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    section {
        padding: 1rem;
    }
}