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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    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(135deg, #2c5530 0%, #4a8653 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}



.calculator-section {
    padding: 40px 30px;
    border-bottom: 3px solid #e9ecef;
}

.calculator-section:last-child {
    border-bottom: none;
}

.calculator-section h2 {
    color: #2c5530;
    margin-bottom: 30px;
    font-size: 2em;
    text-align: center;
}

.info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #2196f3;
    font-size: 1.1em;
}

.calculator-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c5530;
    font-size: 1.1em;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4a8653;
    box-shadow: 0 0 0 3px rgba(74, 134, 83, 0.1);
}

.scores-table {
    margin-bottom: 30px;
    overflow-x: auto;
}

#scores-table {
    width: 100%;
    min-width: 550px;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95em;
}

#scores-table th {
    background-color: #f8f9fa;
    color: #2c5530;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    font-size: 0.9em;
}

#scores-table th:nth-child(1) {
    background-color: #e9ecef;
    width: 80px;
}

#scores-table th:nth-child(2) {
    background-color: #b3d9ff;
    width: 120px;
}

#scores-table th:nth-child(3) {
    background-color: #c8e6c9;
    width: 120px;
}

#scores-table th:nth-child(4) {
    background-color: #fff2cc;
    width: 100px;
}

#scores-table th:nth-child(5) {
    background-color: #f8bbd9;
    width: 100px;
}

#scores-table th:nth-child(6) {
    background-color: #ffe0b3;
    width: 120px;
}

#scores-table th:nth-child(7) {
    background-color: #e9ecef;
    width: 40px;
}

#scores-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    background-color: white;
}

#scores-table td:nth-child(1) {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    padding-left: 12px;
}

#scores-table td:nth-child(2) {
    background-color: #f0f8ff;
}

#scores-table td:nth-child(3) {
    background-color: #f0f8f0;
}

#scores-table td:nth-child(4) {
    background-color: #fffef0;
}

#scores-table td:nth-child(5) {
    background-color: #fdf2f8;
}

#scores-table td:nth-child(6) {
    background-color: #fff8f0;
}

#scores-table td:nth-child(7) {
    background-color: #f8f9fa;
}

#scores-table input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
    background-color: white;
}

#scores-table input:focus {
    outline: none;
    border-color: #4a8653;
    box-shadow: 0 0 0 2px rgba(74, 134, 83, 0.25);
}

.round-label {
    font-weight: 600;
    color: #2c5530;
    white-space: nowrap;
}

.delete-round {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
}

.delete-round:hover {
    background: #c82333;
}

button {
    background: linear-gradient(135deg, #4a8653 0%, #2c5530 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.calculation-section {
    text-align: center;
    margin-bottom: 30px;
}

.result {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    font-size: 1.2em;
    text-align: center;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.result h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
}

.result-value {
    font-size: 2em;
    font-weight: bold;
    color: #2c5530;
    margin: 15px 0;
}

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

.result-table {
    width: 100%;
    min-width: 580px;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95em;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.result-table th {
    background-color: #4a8653;
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #3a6e43;
    font-size: 0.9em;
}

.result-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.result-table tbody tr:nth-child(even) td {
    background-color: #ffffff;
}

.result-table tbody tr:hover td {
    background-color: #e8f5e8;
}

.result-table td:first-child {
    font-weight: 600;
    color: #2c5530;
}

.table-scroll-hint {
    display: none;
    text-align: center;
    margin: 10px 0;
}

footer {
    background: #f8f9fa;
    padding: 40px 30px;
    border-top: 2px solid #e9ecef;
}

.info-section h3 {
    color: #2c5530;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.info-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 1.1em;
}

.info-section strong {
    color: #2c5530;
}

/* Educational Content Section */
.content-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
    margin-top: 40px;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.content-section h2 {
    text-align: center;
    color: #2c5530;
    font-size: 2.5em;
    margin-bottom: 50px;
    font-weight: 700;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.content-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #4a8653;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.content-card h3 {
    color: #2c5530;
    font-size: 1.4em;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.content-card p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

.content-card ul {
    margin: 15px 0;
    padding-left: 20px;
}

.content-card li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

.content-card strong {
    color: #2c5530;
}

.formula-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.formula-box code {
    background: #2c5530;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

.rating-examples, .handicap-levels {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #4a8653;
}

.rating-examples ul, .handicap-levels ul {
    margin: 10px 0;
}

.rating-examples li, .handicap-levels li {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .calculator-section {
        padding: 30px 20px;
    }
    
    .calculator-form {
        padding: 20px;
    }
    
    .scores-table {
        overflow-x: auto;
    }
    
    #scores-table {
        min-width: 380px;
        font-size: 0.7em;
    }
    
    #scores-table th, #scores-table td {
        padding: 3px 1px;
    }
    
    #scores-table input {
        padding: 1px;
        font-size: 0.7em;
    }
    
    /* 移动端缩小Playing Conditions Adjustment列 */
    #scores-table th:nth-child(6) {
        width: 60px;
        font-size: 0.65em;
    }
    
    #scores-table td:nth-child(6) {
        width: 60px;
    }
    
    #scores-table td:nth-child(6) input {
        width: 45px;
    }
    
    /* 内容区域移动端适配 */
    .content-section {
        padding: 40px 0;
        margin-top: 20px;
    }
    
    .content-container {
        padding: 0 20px;
    }
    
    .content-section h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .content-card {
        padding: 20px;
    }
    
    .content-card h3 {
        font-size: 1.2em;
    }

}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .calculator-section h2 {
        font-size: 1.5em;
    }
    
    .result-value {
        font-size: 1.5em;
    }
    
    .result {
        margin: 20px -15px;
        padding: 0 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .result-table {
        min-width: 400px;
        font-size: 0.7em;
    }
    
    .result-table th, .result-table td {
        padding: 5px 1px;
        font-size: 0.75em;
    }
    
    .table-scroll-hint {
        display: block;
    }
    
    /* 移动端缩小Playing Conditions Adjustment列 */
    #scores-table th:nth-child(6) {
        width: 50px;
        font-size: 0.6em;
    }
    
    #scores-table td:nth-child(6) {
        width: 50px;
    }
    
    #scores-table td:nth-child(6) input {
        width: 40px;
    }
    
    /* 结果表格中的Playing Conditions Adjustment列 */
    .result-table th:nth-child(5) {
        width: 50px;
        font-size: 0.6em;
    }
    
    .result-table td:nth-child(5) {
        width: 50px;
    }
    
    /* 小屏幕内容区域适配 */
    .content-section {
        padding: 30px 0;
        margin-top: 15px;
    }
    
    .content-container {
        padding: 0 15px;
    }
    
    .content-section h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }
    
    .content-card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .content-card h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    .formula-box {
        padding: 12px;
    }
    
    .formula-box code {
        font-size: 0.9em;
        padding: 6px 8px;
    }
} 