/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-icon {
    font-size: 3rem;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn i {
    font-size: 1.1rem;
}

/* Main content */
.main-content {
    background: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 40px;
}

.tab-content.active {
    display: block;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-header h2 i {
    color: #667eea;
    font-size: 1.8rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.section-description {
    text-align: center;
    color: #64748b;
    margin-bottom: 25px;
    font-style: italic;
}

/* Form Sections */
.form-section {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.form-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-section h3 i {
    color: #667eea;
}

/* Forms */
.instructor-form, .search-form, .class-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.form-group label i {
    color: #667eea;
    width: 16px;
}

.form-group input,
.form-group select {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #374151;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Availability section */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.day-column {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.day-column:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.day-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.day-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.day-header h4 i {
    color: #667eea;
}

.time-ranges {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.time-range {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.time-input-group {
    display: flex;
    flex-direction: column;
}

.time-input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
    font-size: 0.9rem;
}

.time-input-group input[type="time"] {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
}

.time-input-group input[type="time"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.time-range .remove-time {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.time-range .remove-time:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 24px;
    font-size: 0.9rem;
    min-width: auto;
    width: 100%;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
}

.search-actions {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

/* Search section */
.search-form {
    margin-bottom: 30px;
}

.search-results {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    min-height: 80px;
}

.search-results:empty::before {
    content: "Search results will appear here...";
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    display: block;
    padding: 40px;
}

/* Overview Section */
.overview-section {
    margin-bottom: 50px;
}

.overview-section h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.overview-section h3 i {
    color: #667eea;
}

/* Instructor cards */
.instructor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.instructor-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.instructor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.instructor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.instructor-info h3 {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1.4rem;
}

.instructor-info p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.instructor-specialization {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
}

.instructor-availability {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-availability {
    text-align: center;
}

.day-availability h4 {
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: #475569;
    font-weight: 600;
}

.available-times {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.available-time {
    background: #dcfce7;
    color: #166534;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.scheduled-class {
    background: #fecaca;
    color: #991b1b;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Collective schedule */
.view-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.view-controls label {
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-controls label i {
    color: #667eea;
}

.view-controls select {
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    color: #374151;
    min-width: 200px;
}

.view-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.collective-schedule {
    background: #f8fafc;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.schedule-table th {
    background: #475569;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.schedule-table td {
    background: white;
    vertical-align: top;
}

.available-instructors {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.available-instructor {
    background: #dcfce7;
    color: #166534;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.instructor-with-class {
    background: #fecaca;
    color: #991b1b;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.no-availability {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.9rem;
}

/* Search Results */
.available-instructors-list {
    display: grid;
    gap: 20px;
    margin-top: 25px;
}

.available-instructor-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.available-instructor-item:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.available-instructor-item h4 {
    margin-bottom: 15px;
    color: #1e293b;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.available-instructor-item p {
    margin-bottom: 8px;
    color: #475569;
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    color: #9ca3af;
    padding: 40px;
}

.no-results h3 {
    margin-bottom: 15px;
    color: #374151;
    font-size: 1.4rem;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 60px;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .days-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .instructor-cards {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .tab-content {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .days-grid {
        grid-template-columns: 1fr;
    }
    
    .instructor-cards {
        grid-template-columns: 1fr;
    }
    
    .instructor-availability {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .view-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .schedule-table {
        font-size: 0.9rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 10px 8px;
    }
    
    .time-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .tab-content {
        padding: 20px;
    }
    
    .instructor-availability {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .days-grid {
        gap: 20px;
    }
    
    .day-column {
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    animation: fadeIn 0.5s ease-out;
}

.instructor-card,
.search-results,
.collective-schedule {
    animation: fadeIn 0.5s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
