#licc-noun-fee-analyzer {
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Orange Header */
.fee-analyzer-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: #f39c12;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.fee-analyzer-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.fee-analyzer-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

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

.filter-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    color: #606266;
    width: 100%;
}

.filter-select:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
    outline: none;
}

.filter-button-container {
    display: flex;
    justify-content: center;
}

/* Orange Button */
.check-fees-btn {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    background: #f39c12;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.check-fees-btn:hover:not(:disabled) {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.check-fees-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.licc-courses-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

.licc-courses-table th,
.licc-courses-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.licc-courses-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.licc-courses-table tbody tr:hover {
    background-color: #f8f9fa;
}

.licc-courses-table input[type="checkbox"] {
    transform: scale(1.2);
}

.download-material {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.download-material:hover {
    background: #219a52;
}

.course-selection-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    justify-content: center;
}

.licc-button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 160px;
}

.licc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.calculate-button {
    background: #f39c12;
    color: white;
}

.calculate-button:hover {
    background: #e67e22;
}

/* Results Section - FIXED SCROLLING */
#fee-results {
    margin-top: 30px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

#fee-results h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #f39c12;
    font-size: 24px;
}

/* FIX: Added scrolling container for fee breakdown table */
.fee-results-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    margin-bottom: 25px;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.fee-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensures table has minimum width for scrolling */
    background: white;
}

.fee-breakdown-table th,
.fee-breakdown-table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    text-align: left;
    white-space: nowrap; /* Prevents text wrapping in table cells */
}

.fee-breakdown-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0; /* Makes header sticky when scrolling */
}

.fee-breakdown-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.fee-totals {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
}

.fee-totals h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 12px;
    font-size: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 16px;
    align-items: center;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-divider {
    height: 2px;
    background: #f39c12;
    margin: 15px 0;
    opacity: 0.5;
}

.total-row {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    background: #fef9e7;
    margin: 0 -25px -25px -25px;
    padding: 20px 25px;
    border-radius: 0 0 8px 8px;
}

/* Mobile Responsive - VERTICAL FILTERS */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filters-section {
        padding: 20px;
    }
    
    .filter-select {
        padding: 10px 12px;
    }
    
    .check-fees-btn {
        padding: 12px 30px;
        font-size: 15px;
        min-width: 180px;
        width: 100%;
    }
    
    .course-selection-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .licc-button {
        width: 100%;
        max-width: 280px;
    }
    
    .fee-analyzer-header {
        padding: 20px 15px;
    }
    
    .fee-analyzer-header h2 {
        font-size: 24px;
    }
    
    .fee-analyzer-header p {
        font-size: 14px;
    }
    
    /* FIX: Improved mobile results styling */
    #fee-results {
        padding: 20px 15px;
        margin: 20px -10px;
        width: calc(100% + 20px);
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
    
    #fee-results h3 {
        font-size: 20px;
        text-align: center;
    }
    
    /* FIX: Better scrolling container for mobile */
    .fee-results-container {
        margin: 0 -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .fee-breakdown-table {
        min-width: 600px;
    }
    
    .fee-breakdown-table th,
    .fee-breakdown-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .summary-row {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .total-row {
        font-size: 16px;
        margin: 0 -15px -20px -15px;
        padding: 15px;
    }
    
    .licc-courses-table th,
    .licc-courses-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .download-material {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .filters-section {
        padding: 15px;
    }
    
    .fee-analyzer-header {
        padding: 15px 10px;
        border-radius: 6px;
    }
    
    .fee-analyzer-header h2 {
        font-size: 20px;
    }
    
    .licc-courses-table {
        min-width: 600px;
    }
    
    /* FIX: Extra small mobile adjustments */
    .fee-breakdown-table th,
    .fee-breakdown-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    #fee-results {
        padding: 15px 10px;
        margin: 15px -5px;
        width: calc(100% + 10px);
    }
}

/* Scrollbar styling for better mobile experience */
.fee-results-container::-webkit-scrollbar {
    height: 8px;
}

.fee-results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.fee-results-container::-webkit-scrollbar-thumb {
    background: #f39c12;
    border-radius: 4px;
}

.fee-results-container::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}