/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0f5b5f;
    --secondary-color: #1f2933;
    --accent-color: #d97706;
    --success-color: #1f8a5b;
    --warning-color: #f59e0b;
    --background-color: #f2efe8;
    --card-background: #ffffff;
    --text-color: #1f2933;
    --text-secondary: #5b6770;
    --border-color: #d6d0c7;
    --shadow: 0 12px 30px rgba(31, 41, 51, 0.08);
    --shadow-hover: 0 18px 40px rgba(31, 41, 51, 0.15);
    --transition: all 0.28s ease;
    --border-radius: 16px;
    --font-sans: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', 'Times New Roman', serif;
}

body {
    font-family: var(--font-sans);
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Dark Theme */
body.dark-theme {
    --background-color: #0e1416;
    --card-background: #121b1f;
    --text-color: #f5f5f4;
    --text-secondary: #b6c1c7;
    --border-color: #26333b;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 24px 50px rgba(0, 0, 0, 0.6);
    background: var(--background-color);
}

/* Container */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(31, 41, 51, 0.8);
    color: #f8fafc;
    padding: 2rem 0 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(18px);
}

header .container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    padding: 6px;
    background: rgba(248, 250, 252, 0.95);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
    flex-shrink: 0;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.today-date {
    font-size: 0.95rem;
    opacity: 0.85;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    color: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Controls Section */
.controls {
    background: rgba(255, 255, 255, 0.65);
    padding: 1.75rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: grid;
    gap: 1.25rem;
    backdrop-filter: blur(18px);
}

body.dark-theme .controls {
    background: rgba(18, 27, 31, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1px solid rgba(31, 41, 51, 0.18);
    border-radius: 999px;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

body.dark-theme .search-box input {
    background: rgba(15, 26, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(15, 91, 95, 0.15);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    width: 100%;
}

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

.filter-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item select {
    padding: 0.6rem 0.9rem;
    border: 1px solid rgba(31, 41, 51, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

body.dark-theme .filter-item select {
    background: rgba(15, 26, 30, 0.7);
}

.filter-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 91, 95, 0.12);
}

.grade-toggle {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid rgba(31, 41, 51, 0.18);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

.chip.active {
    background: rgba(15, 91, 95, 0.85);
    color: #f8fafc;
    border-color: transparent;
    box-shadow: var(--shadow);
}

body.dark-theme .chip {
    background: rgba(15, 26, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

.view-switch {
    align-items: flex-start;
}

.view-toggle {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.view-btn {
    border: 1px solid rgba(31, 41, 51, 0.18);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-secondary);
    padding: 0.5rem 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

.view-btn.active {
    background: rgba(31, 41, 51, 0.9);
    color: #f8fafc;
    border-color: transparent;
    box-shadow: var(--shadow);
}

.view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-theme .view-btn {
    background: rgba(15, 26, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

body.dark-theme .view-btn.active {
    background: rgba(15, 91, 95, 0.85);
    color: #f8fafc;
}

.actions {
    display: flex;
    gap: 0.6rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.4rem;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
    color: #f8fafc;
}

.btn-primary {
    background: rgba(15, 91, 95, 0.9);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: rgba(31, 41, 51, 0.9);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Statistics */
.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.4rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: rgba(15, 91, 95, 0.9);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Countdown Section */
.countdown-section {
    margin: 2rem 0;
}

.countdown-card {
    background: rgba(31, 41, 51, 0.85);
    color: #f8fafc;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
}

.countdown-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.countdown-header h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
}

.countdown-header i {
    font-size: 2rem;
}

.countdown-display {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-exam-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.next-exam-info--ongoing {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.exam-status-badge {
    align-self: center;
    background: #f59e0b;
    color: #1f2933;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
}

.next-exam-info .exam-subject {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.45);
}

.exam-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: #e2edf0;
    font-size: 0.95rem;
}

.exam-meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.exam-meta-row i {
    width: 20px;
    color: #f59e0b;
}

.exam-meta-row--alert {
    margin-top: 0.3rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
    font-weight: 700;
    font-size: 1.05rem;
}

.countdown-content {
    text-align: center;
    background: rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    display: inline-block;
    min-width: min(360px, 90%);
}

.countdown-time {
    display: block;
    font-size: 2.6rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    margin-bottom: 0.4rem;
    color: #f8fafc;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.45);
}

.countdown-exam {
    display: block;
    font-size: 1.1rem;
    opacity: 0.95;
    color: #e5f1f1;
    text-shadow: 0 2px 8px rgba(15, 23, 42, 0.4);
}

.countdown-empty {
    font-size: 1.2rem;
    opacity: 0.95;
    color: #f8fafc;
}

.countdown-now {
    font-size: 1.8rem;
    font-weight: 700;
    animation: pulse 2s infinite;
    color: #f8fafc;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.45);
}

.countdown-timer {
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.15);
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.countdown-value {
    font-size: 2.3rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.45);
}

.countdown-label {
    font-size: 0.95rem;
    color: #e2edf0;
    margin-top: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Content */
.content {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(18px);
}

.view-container {
    padding: 2rem;
}

.hidden {
    display: none !important;
}

/* Schedule View */
.schedule-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(31, 41, 51, 0.18);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.tab-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.tab-btn.active {
    color: #f8fafc;
    background: rgba(15, 91, 95, 0.85);
    border-color: transparent;
}

.schedule-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.legend-color.exam-upcoming {
    background: rgba(31, 138, 91, 0.9);
}

.legend-color.exam-in_progress {
    background: rgba(217, 119, 6, 0.9);
    animation: pulse 2s infinite;
}

.legend-color.exam-completed {
    background: rgba(44, 125, 160, 0.9);
    opacity: 0.8;
}

.time-slot-info {
    text-align: center;
    line-height: 1.2;
}

.time-slot-info small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Exam Status Styling */
.exam-cell {
    background: rgba(31, 138, 91, 0.9);
    color: #f8fafc;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.exam-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
    transition: var(--transition);
}

.exam-cell:hover::before {
    left: 100%;
}

.exam-cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.exam-cell.empty {
    background: transparent;
    color: var(--text-secondary);
    cursor: default;
    border: 2px dashed var(--border-color);
}

.exam-cell.empty:hover {
    transform: none;
    box-shadow: none;
}

.exam-cell.empty::before {
    display: none;
}

.exam-upcoming {
    background: rgba(31, 138, 91, 0.9);
}

.exam-in_progress {
    background: rgba(217, 119, 6, 0.9);
    animation: pulse 2s infinite;
    box-shadow: 0 0 18px rgba(217, 119, 6, 0.35);
}

.exam-completed {
    background: rgba(44, 125, 160, 0.9);
    opacity: 0.8;
}

.exam-unknown {
    background: rgba(107, 107, 107, 0.9);
}

.schedule-content {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid var(--border-color);
    padding: 1rem;
    text-align: center;
}

.schedule-table th {
    background: rgba(31, 41, 51, 0.9);
    color: #f8fafc;
    font-weight: 600;
}

.schedule-table th:first-child {
    width: 130px;
    background: rgba(15, 91, 95, 0.9);
}

.schedule-table tr:hover {
    background: rgba(15, 91, 95, 0.06);
}

/* List View */
.exam-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.exam-table th,
.exam-table td {
    border: 1px solid var(--border-color);
    padding: 1rem;
    text-align: left;
}

.exam-table th {
    background: rgba(31, 41, 51, 0.9);
    color: #f8fafc;
    font-weight: 600;
}

.exam-table tbody tr:hover {
    background: rgba(15, 91, 95, 0.06);
}

.exam-row {
    transition: var(--transition);
}

.exam-row.exam-upcoming {
    background: rgba(31, 138, 91, 0.08);
}

.exam-row.exam-in_progress {
    background: rgba(217, 119, 6, 0.12);
    animation: pulse 2s infinite;
}

.exam-row.exam-completed {
    background: rgba(44, 125, 160, 0.08);
    opacity: 0.85;
}

.exam-subject {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.exam-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-upcoming {
    background: rgba(31, 138, 91, 0.2);
    color: #1f8a5b;
}

.status-in_progress {
    background: rgba(217, 119, 6, 0.2);
    color: #d97706;
}

.status-completed {
    background: rgba(44, 125, 160, 0.2);
    color: #2c7da0;
}

.grade-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(15, 91, 95, 0.9);
    color: #f8fafc;
    margin-right: 0.5rem;
}

/* Timeline View */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-item.timeline-today .timeline-content {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 24px rgba(15, 91, 95, 0.25);
}

.timeline-content {
    flex: 1;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 0 2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

.timeline-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 91, 95, 0.9);
    color: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1;
}

.today-badge {
    background: var(--accent-color);
    color: #f8fafc;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

.exam-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exam-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
}

.exam-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) .exam-item:hover {
    transform: translateX(-5px);
}

.exam-item.exam-upcoming {
    background: rgba(31, 138, 91, 0.12);
    border-left: 4px solid #1f8a5b;
}

.exam-item.exam-in_progress {
    background: rgba(217, 119, 6, 0.16);
    border-left: 4px solid #d97706;
    animation: pulse 2s infinite;
}

.exam-item.exam-completed {
    background: rgba(44, 125, 160, 0.12);
    border-left: 4px solid #2c7da0;
    opacity: 0.85;
}

.timeline-item:nth-child(odd) .exam-item {
    border-left: none;
    border-right: 4px solid #1f8a5b;
}

.timeline-item:nth-child(odd) .exam-item.exam-in_progress {
    border-right: 4px solid #d97706;
}

.timeline-item:nth-child(odd) .exam-item.exam-completed {
    border-right: 4px solid #2c7da0;
}

.exam-time {
    min-width: 120px;
    text-align: left;
}

.exam-time strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.exam-time small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.timeline-item:nth-child(odd) .exam-time {
    text-align: right;
}

.exam-details {
    flex: 1;
}

.exam-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.timeline-item:nth-child(odd) .exam-meta {
    justify-content: flex-end;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.8);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease;
    position: relative;
    backdrop-filter: blur(18px);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close:hover {
    color: var(--accent-color);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--primary-color);
    backdrop-filter: blur(16px);
}

.notification.notification-warning {
    border-left-color: var(--warning-color);
}

.notification.notification-info {
    border-left-color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--accent-color);
}

/* Footer */
footer {
    background: rgba(31, 41, 51, 0.9);
    color: #f8fafc;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 960px) {
    .header-main {
        flex-direction: column;
        text-align: center;
    }

    .header-info {
        align-items: center;
    }

    .header-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .actions {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .schedule-legend {
        flex-direction: column;
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    header {
        padding: 1.5rem 0;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .current-time {
        font-size: 1.2rem;
    }

    .controls {
        padding: 1.25rem;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .search-box {
        min-width: auto;
    }

    .statistics {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .countdown-card {
        padding: 1.5rem;
    }

    .countdown-time {
        font-size: 2rem;
    }

    .schedule-tabs {
        justify-content: center;
    }

    .view-container {
        padding: 1.2rem;
    }

    .timeline::before {
        left: 24px;
    }

    .timeline-item {
        flex-direction: row !important;
        margin-left: 48px;
    }

    .timeline-content {
        margin: 0 0 0 1rem;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }

    .timeline-date {
        left: 24px;
        transform: translateX(-50%);
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .exam-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .exam-time {
        min-width: auto;
        text-align: center;
    }

    .timeline-item:nth-child(odd) .exam-time {
        text-align: center;
    }

    .exam-meta {
        justify-content: center;
    }

    .timeline-item:nth-child(odd) .exam-meta {
        justify-content: center;
    }

    .notification {
        left: 12px;
        right: 12px;
        min-width: auto;
        max-width: none;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .exam-table th,
    .exam-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .exam-cell {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .controls,
    .statistics,
    .theme-toggle,
    .user-role-selector,
    .modal,
    footer {
        display: none !important;
    }

    header {
        background: none;
        color: black;
        box-shadow: none;
    }

    .content {
        box-shadow: none;
    }

    .view-container {
        padding: 0;
    }

    .exam-cell {
        background: #f0f0f0 !important;
        color: black !important;
    }

    .schedule-table th {
        background: #333 !important;
        color: white !important;
    }
}
