:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --bg-color: #ffffff;
    --surface-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --success-color: #34d399;
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--bg-color) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--bg-color);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    position: relative;
}

.logo-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.logo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon i {
    font-size: 1.8rem;
    color: white;
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.header-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.theme-toggle {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Main Content */
.main {
    flex: 1;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Filters */
.filters-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filters-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.reset-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.reset-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.filter-select {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

/* Schedule Section */
.schedule-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.stats {
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Table */
.table-container {
    overflow-x: auto;
    overflow-y: auto;
    flex: 1;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.schedule-table th {
    background: var(--surface-color);
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
}

.schedule-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.schedule-table tbody tr {
    animation: fadeInUp 0.6s ease-out;
}

.schedule-table tbody tr:hover {
    background: var(--surface-color);
    transform: translateX(4px);
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column specific styles */
.group-cell {
    font-weight: 600;
    color: var(--primary-color);
}

.teacher-cell {
    color: var(--text-secondary);
}

.subgroup-cell {
    text-align: center;
    color: var(--text-muted);
}

.discipline-cell {
    max-width: 300px;
    word-wrap: break-word;
}

.classroom-cell {
    text-align: center;
    font-weight: 500;
}

.time-cell {
    font-weight: 500;
    color: var(--text-secondary);
}

.date-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.no-data {
    text-align: center;
    padding: 4rem !important;
    color: var(--text-muted);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-data div {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 1.5rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-card i:first-child {
    font-size: 2.2rem;
    color: var(--primary-color);
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.email-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
    padding: 8px 14px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.email-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .header-actions {
        position: static;
        transform: none;
        margin-top: 1rem;
    }
    
    .logo-card {
        padding: 1rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo-text h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .main {
        padding: 1rem 0;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-card {
        padding: 0.75rem 1rem;
    }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .logo-icon i {
        font-size: 1.5rem;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .filters-section,
    .schedule-section {
        padding: 1rem;
    }
    
    .contact-card {
        padding: 1rem;
    }
    
    .contact-info h3 {
        font-size: 1rem;
    }
    
    .contact-info p {
        font-size: 0.85rem;
    }
    
    .email-link {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}