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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 600;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.2em;
}

h3 {
    color: #34495e;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 1em;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.year-section h3,
.date-section h3 {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.date-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.year-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.year-selection label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

.year-selection label:has(input:disabled) {
    color: #999;
    cursor: not-allowed;
}

.date-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.date-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input label {
    font-weight: 500;
    color: #555;
}

.date-input input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.checkbox-input {
    display: flex;
    align-items: center;
}

.checkbox-input label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
}

.team-selection {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.all-teams-section {
    margin-bottom: 15px;
    text-align: center;
}

.all-teams-section label {
    font-weight: 600;
    font-size: 1.1em;
}

.leagues-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 15px;
}

.league-column {
    display: flex;
    flex-direction: column;
}

.clear-teams-section {
    text-align: center;
}

.team-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tree-item {
    display: flex;
    flex-direction: column;
}

.tree-item > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 4px 0;
}

.tree-item.league > label {
    font-weight: 600;
    color: #2c3e50;
}

.tree-item.division > label {
    font-weight: 500;
    color: #34495e;
    margin-left: 0px;
}

.tree-children {
    margin-left: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.tree-children label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 400;
    color: #555;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.tree-children label:hover {
    color: #2c3e50;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.options-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

#downloadExcelBtn, #downloadCSVBtn {
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 200px;
}

#downloadExcelBtn:hover, #downloadCSVBtn:hover {
    background-color: #2980b9;
}

#downloadExcelBtn:disabled, #downloadCSVBtn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.clear-btn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.clear-btn:hover {
    background-color: #c0392b;
}

.generate-section {
    text-align: center;
    margin: 20px 0;
}

.generate-btn {
    background-color: #e74c3c;
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 140px;
}

.generate-btn:hover {
    background-color: #c0392b;
}

.highlighting-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-picker-group {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-option label {
    font-weight: 500;
    color: #555;
    min-width: 120px;
}

.color-option input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.color-option input[type="color"]:hover {
    border-color: #3498db;
}

.highlighting-controls {
    margin-top: 10px;
}

.include-options {
    margin-bottom: 15px;
}

.include-line,
.separate-line {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.include-label,
.separate-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
}

.include-line label,
.separate-line label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    margin-right: 20px;
}

.highlighting-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

.color-option input[type="color"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}




@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .date-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-picker-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .leagues-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .include-line,
    .separate-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .include-label,
    .separate-label {
        min-width: auto;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .tree-item.division > label {
        margin-left: 10px;
    }
    
    .tree-children {
        margin-left: 10px;
        gap: 6px;
    }
    
    .tree-children label {
        font-size: 13px;
    }
    
    .team-selection {
        padding: 10px;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    #downloadExcelBtn, #downloadCSVBtn {
        min-width: 180px;
    }
}