:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f43f5e;
    --accent-light: #fb7185;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -50px;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #0ea5e9;
    top: 40%;
    left: 20%;
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.title span {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

/* Form Styles */
.exam-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Exams List */
.exams-list-section {
    margin-top: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    border: 1px dashed var(--border);
    color: var(--text-muted);
}

/* Exam Card */
.exam-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.exam-card.urgent::before {
    background: var(--accent);
}

.exam-card.passed {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.exam-card.passed::before {
    background: var(--text-muted);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.exam-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.exam-date-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete:hover {
    background: var(--accent);
    color: white;
}

/* Countdown Styles */
.countdown-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.countdown-box {
    background: rgba(15, 23, 42, 0.4);
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.countdown-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.status-label {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem;
    text-align: center;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.4);
}

.status-urgent {
    color: var(--accent-light);
}

.status-passed {
    color: var(--text-muted);
}

.status-ongoing {
    color: #10b981;
}

/* Views Management */
.views-wrapper {
    position: relative;
    width: 100%;
}

.view {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.bottom-nav.nav-hidden {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    pointer-events: none;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.nav-item .nav-icon {
    font-size: 1.2rem;
}

.nav-item .nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Responsive adjust for mobile */
@media (max-width: 640px) {
    .container {
        padding: 1rem 1rem 7.5rem 1rem;
    }

    .header {
        margin-bottom: 1.5rem;
    }

    .title {
        font-size: 2.2rem;
        display: flex;
        flex-direction: column;
        gap: 0;
        line-height: 1.1;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-top: 0.5rem;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }

    .glass-card {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        /* Stacked for better mobile alignment */
        gap: 1.25rem;
    }

    .exams-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bottom-nav {
        bottom: 1.5rem;
        width: 92%;
        max-width: 450px;
        padding: 0.5rem;
        gap: 0.5rem;
        border-radius: 24px;
        background: rgba(15, 23, 42, 0.9);
    }

    .nav-item {
        flex: 1;
        padding: 0.75rem 0.5rem;
        min-height: 65px;
        justify-content: center;
        border-radius: 18px;
    }

    .nav-item.active {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--glass-border);
    }

    .nav-item .nav-icon {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }

    .nav-item .nav-label {
        font-size: 0.65rem;
    }

    /* Fix mobile input height */
    input[type="date"],
    input[type="time"],
    select.custom-select {
        min-height: 3.2rem;
        width: 100%;
        padding: 0.75rem;
    }
}

/* Day Selector */
.day-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    /* Firefox */
}

.day-selector::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.day-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.day-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.day-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Lesson Cards */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lesson-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-light);
    opacity: 0.5;
}

.lesson-card.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.lesson-card.active::before {
    opacity: 1;
    background: var(--primary);
}

.lesson-time-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    font-weight: 600;
}

.lesson-time-start {
    font-size: 1.1rem;
    color: var(--text-main);
}

.lesson-time-end {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lesson-content {
    flex: 1;
}

.lesson-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.lesson-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lesson-detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lesson-actions {
    display: flex;
    gap: 0.5rem;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    z-index: 100;
    transition: var(--transition);
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary-dark);
}

.fab.fab-hidden {
    transform: translateY(150%) scale(0.5);
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 640px) {
    .fab {
        bottom: 7.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

/* Form Helpers */
.custom-select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.empty-hour {
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}