:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #00cec9;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #ff7675;
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    padding-bottom: 50px;
}

/* Background Animation */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: #a29bfe;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.globe-2 {
    width: 300px;
    height: 300px;
    background: #81ecec;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.globe-3 {
    width: 250px;
    height: 250px;
    background: #fd79a8;
    top: 40%;
    left: 40%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 40px);
    }
}

/* Glass Container */
.glass-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    min-height: 85vh;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: var(--glass-border);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.header-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.branch-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.header-widgets {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-widget,
.countdown-widget {
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    padding: 0.8rem 1.5rem;
    border-radius: 15px;
    border: var(--glass-border);
    min-width: 160px;
}

.countdown-widget {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.widget-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

#countdown-timer {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.next-event-name {
    font-size: 0.7rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

#current-date {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-primary);
}

#current-time {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.4);
    border: var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.filter-divider {
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 0.5rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Course Cards */
.course-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    border: var(--glass-border);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card.hidden {
    display: none;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

.card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.eng-header {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.it-header {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
}

.os-header {
    background: linear-gradient(135deg, #00b894, #55efc4);
}

.math-header {
    background: linear-gradient(135deg, #d63031, #ff7675);
}

.db-header {
    background: linear-gradient(135deg, #e17055, #fab1a0);
}

.sci-header {
    background: linear-gradient(135deg, #e84393, #fd79a8);
}

.course-icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-info h3 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.2;
}

.course-info span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

/* Task List */
.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(108, 92, 231, 0.2);
}

.task-item.completed {
    opacity: 0.6;
    background: rgba(200, 200, 200, 0.2);
}

.task-item.completed .task-name {
    text-decoration: line-through;
}

.task-item.hidden {
    display: none;
}

/* Checkbox */
.task-check {
    margin-left: 0.8rem;
    padding-top: 0.2rem;
}

.task-check input {
    display: none;
}

.task-check label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.task-check input:checked+label {
    background: var(--primary-color);
}

.task-check input:checked+label::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.task-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.8rem;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.task-icon.quiz {
    background: #e17055;
}

.task-icon.assignment {
    background: #0984e3;
}

.task-icon.discussion {
    background: #00b894;
}

.task-icon.project {
    background: #6c5ce7;
}

.task-details {
    flex-grow: 1;
}

.task-name {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.task-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.task-date {
    display: block;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.time-badge {
    background: rgba(108, 92, 231, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 5px;
}

.task-location {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.start-date {
    color: var(--text-secondary);
}

.end-date {
    color: var(--danger-color);
    font-weight: 600;
}

.separator {
    color: var(--primary-color);
    font-size: 0.7rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state.hidden {
    display: none;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
}

/* Active Tasks Banner */
.active-tasks-banner {
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: white;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 20px rgba(214, 48, 49, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.active-tasks-banner.hidden {
    display: none;
}

.banner-icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.banner-content {
    flex-grow: 1;
    overflow: hidden;
}

.banner-content h3 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    opacity: 0.9;
}

.scrolling-text {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    font-weight: 700;
    font-size: 1.1rem;
}

.scrolling-text span {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 20s linear infinite;
    /* Ensure content is visible during animation */
    min-width: 100%;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer span {
    color: var(--primary-color);
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        text-align: center;
    }

    .header-widgets {
        flex-direction: column;
        width: 100%;
    }

    .date-widget,
    .countdown-widget {
        width: 100%;
    }

    .filter-bar {
        justify-content: center;
    }
}