* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3478c8;
    --secondary-color: #50c878;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e1e8ed;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 24px;
}

/* Header */
header {
    background: linear-gradient(135deg, #f0f4f8, #e8eef3);
    color: var(--text-primary);
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

header h1 {
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.date-display {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: linear-gradient(135deg, #fafbfc, #f5f7fa);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

.tab-btn {
    padding: 5px 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #ffffff;
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    font-weight: 700;
}

/* Tomorrow's Reminder */
.reminder-section {
    background: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 4px 10px;
    animation: slideIn 0.3s ease;
}

.reminder-compact {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reminder-icon {
    font-size: 11px;
    opacity: 0.7;
}

.reminder-text {
    font-size: 10px;
    color: #666;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

@media (min-width: 768px) {
    .reminder-section {
        padding: 5px 16px;
    }
    
    .reminder-icon {
        font-size: 12px;
    }
    
    .reminder-text {
        font-size: 11px;
    }
}

/* Tasks Container */
.tasks-container {
    padding: 10px 6px;
}

.optional-section .tasks-container {
    padding: 0 !important;
}

.task-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    overflow: visible;
}

.task-card.completed {
    opacity: 0.7;
    border-left-color: var(--secondary-color);
}

.task-card.skipped {
    opacity: 0.6;
    border-left-color: var(--warning-color);
    background: #fffbf0;
}

.task-card.hidden {
    display: none;
}

.hidden-group {
    display: none !important;
}

.task-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    margin-top: 2px;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.optional-task .task-title {
    font-weight: 400;
    font-size: 16px;
}

.task-frequency {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.85;
    line-height: 1;
    vertical-align: middle;
}

.bullet {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 11px;
    font-weight: bold;
    user-select: none;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    height: 11px;
}

.task-notes {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

/* Hidden checkbox for tomorrow tab */
.hidden-checkbox {
    display: none !important;
}

.task-meta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    line-height: 1;
}

.task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.7;
    line-height: 1;
    vertical-align: middle;
}

.last-completed {
    color: var(--secondary-color);
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}

.skipped-badge {
    color: var(--warning-color);
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}

.pending-skips-warning {
    background: #fff3cd;
    border-left: 3px solid var(--warning-color);
    padding: 6px 10px;
    margin-top: 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #856404;
    font-weight: 600;
}

.task-actions {
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.btn-skip {
    padding: 4px 12px;
    background: rgba(224, 224, 224, 0.3);
    color: #666;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0.5;
}

.btn-skip:hover {
    background: rgba(208, 208, 208, 0.6);
    color: #555;
    opacity: 0.8;
}

.btn-skip:active {
    transform: scale(0.95);
}

.btn-complete-skipped {
    padding: 6px 16px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-complete-skipped:hover {
    background: #3fa85f;
}

.btn-complete-skipped:active {
    transform: scale(0.95);
}

/* Priority Task Group */
.priority-task-group {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.08), rgba(230, 126, 34, 0.08));
    border: 2px solid var(--warning-color);
    border-radius: 12px;
    padding: 0;
    margin: 10px;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.15);
    overflow: hidden;
}

.priority-task-group .task-card {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.priority-task-group .task-card:last-child {
    border-bottom: none;
}

/* 3x Per Week Task Group */
.task-group-3x {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(142, 68, 173, 0.08));
    border: 2px solid #9b59b6;
    border-radius: 12px;
    padding: 0;
    margin: 10px;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.15);
    overflow: hidden;
}

.task-group-3x .task-card {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.task-group-3x .task-card:last-child {
    border-bottom: none;
}

/* 2x Per Week Task Group */
.task-group-2x {
    background: linear-gradient(135deg, rgba(52, 120, 200, 0.08), rgba(80, 200, 120, 0.08));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 0;
    margin: 10px;
    box-shadow: 0 4px 12px rgba(52, 120, 200, 0.15);
    overflow: hidden;
}

.task-group-2x .task-card {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.task-group-2x .task-card:last-child {
    border-bottom: none;
}

/* 1x Per Week Task Group */
.task-group-1x {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.06), rgba(127, 140, 141, 0.06));
    border: 2px solid #aab6b7;
    border-radius: 12px;
    padding: 0;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.1);
    overflow: hidden;
    opacity: 0.78;
}

.task-group-1x .task-card {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.task-group-1x .task-card:last-child {
    border-bottom: none;
}

/* Optional Section */
.optional-section {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.06), rgba(127, 140, 141, 0.06));
    border: 2px solid #aab6b7;
    border-radius: 12px;
    padding: 0;
    margin: -10px 16px 10px 16px;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.optional-section.loaded {
    opacity: 0.78;
    visibility: visible;
}

.optional-section h2 {
    font-size: 14px;
    margin: 0;
    padding: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(149, 165, 166, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.optional-section .tasks-container {
    padding: 0 !important;
}

.optional-section .task-card {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.optional-section .task-card:last-child {
    border-bottom: none;
}

/* Reset All Data Section */
.reset-all-container {
    background: var(--card-bg);
    margin: 10px 16px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid #ffe0e0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.reset-all-container.loaded {
    opacity: 1;
    visibility: visible;
}

.btn-reset-daily {
    background: rgba(224, 224, 224, 0.3);
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    width: auto;
    justify-content: center;
    min-width: auto;
}

.btn-reset-daily:hover {
    background: var(--text-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.reset-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.btn-reset-all {
    background: rgba(224, 224, 224, 0.3);
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    justify-content: center;
    min-width: auto;
}

.btn-reset-all:hover {
    background: var(--text-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.reset-warning {
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger-color);
    font-weight: 500;
}

/* Floating Action Button */
.fab {
    display: none;
}

/* Sync Status */
.sync-status {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.sync-status.show {
    opacity: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Mobile-specific modal fixes */
@media (max-width: 767px) {
    .modal {
        align-items: flex-start;
        padding: 10px;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        margin-top: 10px;
    }

    .note-modal,
    .dates-modal,
    .tasks-list-modal,
    .manage-tasks-modal {
        max-height: 85vh;
    }

    .modal-content textarea {
        min-height: 120px;
        max-height: 40vh;
    }

    /* Ensure buttons are always visible */
    .modal-actions {
        position: sticky !important;
        bottom: 0;
        background: var(--card-bg) !important;
        padding: 12px 0 0 0 !important;
        margin-top: 12px !important;
        border-top: 2px solid var(--border-color) !important;
        z-index: 10;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 28px;
        margin-bottom: 8px;
        font-weight: 500;
    }

    .date-display {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .menu-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .countdown-container {
        top: 20px;
        right: 72px;
        gap: 8px;
    }

    .exam-countdown {
        padding: 6px 10px;
        min-width: 55px;
        border-radius: 12px;
    }

    .exam-countdown.expanded {
        min-width: 140px;
        padding: 10px 14px;
        gap: 5px;
    }
    
    .exam-countdown.expanded .countdown-days {
        margin-bottom: 3px;
    }

    .exam-countdown.expanded .countdown-label {
        font-size: 15px;
        line-height: 1.7;
    }

    .exam-countdown.expanded .countdown-days .days-label {
        font-size: 18px;
    }
    
    .countdown-days {
        font-size: 18px;
    }
    
    .countdown-label {
        font-size: 9px;
    }

    .logout-btn {
        top: 20px;
        right: 20px;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
    }

    .menu-modal {
        padding: 20px;
        left: calc(50% - 384px);
        right: calc(50% - 384px);
        width: 768px;
        margin: 0 auto;
        justify-content: flex-end;
    }

    .menu-content {
        margin-top: 60px;
    }

    .filter-tabs {
        padding: 16px;
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
    }

    .tasks-container {
        padding: 10px;
    }

    .optional-section {
        margin: -10px 20px 20px 20px;
    }

    .reset-all-container {
        margin: 10px 20px;
    }

    .optional-section .tasks-container {
        padding: 0 !important;
    }

    .task-card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .task-header {
        gap: 12px;
        margin-bottom: 12px;
    }

    .task-checkbox {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .task-title {
        font-size: 18px;
        line-height: 1.4;
    }

    .task-frequency {
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 12px;
    }

    .task-notes {
        font-size: 14px;
        margin-top: 8px;
        line-height: 1.5;
    }

    .task-meta {
        gap: 12px;
        margin-top: 12px;
        font-size: 12px;
    }

    .task-actions {
        margin: 0;
    }

    .btn-skip {
        font-size: 11px;
        padding: 4px 12px;
    }

    .current-segment {
        padding: 12px 16px;
        border-radius: 8px;
        margin-top: 12px;
        font-size: 14px;
        line-height: 1.6;
    }

    .segment-pages {
        font-size: 13px;
        margin-left: 8px;
    }

    .segment-category {
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 11px;
        margin-left: 8px;
    }

    .pending-skips-warning {
        padding: 8px 12px;
        margin-top: 8px;
        font-size: 13px;
    }

    .last-note {
        padding: 8px 12px;
        margin-top: 8px;
        font-size: 13px;
        max-height: none;
        line-clamp: unset;
        -webkit-line-clamp: unset;
    }

    .fab {
        bottom: 32px;
        right: 32px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        /* Main Colors - Brighter for better visibility */
        --primary-color: #60a5fa;
        --secondary-color: #4ade80;
        --danger-color: #f87171;
        --warning-color: #fbbf24;

        /* Backgrounds - Slightly warmer dark */
        --bg-color: #0c0c0e;
        --card-bg: #18181b;

        /* Text - Better contrast */
        --text-primary: #f4f4f5;
        --text-secondary: #a1a1aa;

        /* Borders & Shadows */
        --border-color: #27272a;
        --shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
        --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.7);

        /* Additional dark mode specific */
        --surface-elevated: #1f1f23;
        --surface-hover: #27272a;
        --accent-glow: rgba(96, 165, 250, 0.15);
    }

    /* Exam Countdown Dark Mode */
    .exam-countdown {
        background: linear-gradient(135deg, #dc2626, #991b1b);
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    }

    .exam-countdown:hover {
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
    }

    .primary-countdown {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
    }

    .primary-countdown:hover {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
    }

    /* Header */
    header {
        background: linear-gradient(135deg, var(--card-bg), var(--surface-elevated, #1f1f23));
        border-bottom: 1px solid var(--border-color);
    }

    /* Filter Tabs */
    .filter-tabs {
        background: linear-gradient(135deg, var(--bg-color), var(--card-bg));
        border-bottom: 1px solid var(--border-color);
    }

    .tab-btn {
        border: 1.5px solid var(--border-color);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-secondary);
    }

    .tab-btn.active {
        background: var(--surface-elevated, #1f1f23);
        color: var(--text-primary);
        border-color: var(--primary-color);
        box-shadow: 0 2px 8px rgba(96, 165, 250, 0.15);
    }

    /* Reminder Section */
    .reminder-section {
        background: rgba(255, 255, 255, 0.04);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .reminder-text {
        color: var(--text-secondary);
    }

    /* Task Cards */
    .task-card {
        background: var(--card-bg);
        border-left-color: var(--primary-color);
    }

    .task-card.skipped {
        background: #2d2414;
    }

    .task-frequency {
        color: var(--text-secondary);
    }

    .bullet {
        color: var(--text-secondary);
    }

    .task-meta span {
        color: var(--text-secondary);
    }

    /* Buttons */
    .btn-skip {
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-secondary);
    }

    .btn-skip:hover {
        background: rgba(255, 255, 255, 0.12);
        color: var(--text-primary);
    }

    /* Priority Task Group */
    .priority-task-group {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.12));
        border: 2px solid #d97706;
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
    }

    .priority-task-group .task-card {
        border-bottom: 1px solid var(--border-color);
    }

    /* 3x Per Week Task Group */
    .task-group-3x {
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(147, 51, 234, 0.12));
        border: 2px solid #a855f7;
        box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
    }

    .task-group-3x .task-card {
        border-bottom: 1px solid var(--border-color);
    }

    /* 2x Per Week Task Group */
    .task-group-2x {
        background: linear-gradient(135deg, rgba(91, 157, 247, 0.12), rgba(95, 214, 150, 0.12));
        border: 2px solid var(--primary-color);
        box-shadow: 0 4px 12px rgba(91, 157, 247, 0.2);
    }

    .task-group-2x .task-card {
        border-bottom: 1px solid var(--border-color);
    }

    /* 1x Per Week Task Group */
    .task-group-1x {
        background: linear-gradient(135deg, rgba(107, 114, 128, 0.08), rgba(75, 85, 99, 0.08));
        border: 2px solid #6b7280;
        box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15);
    }

    .task-group-1x .task-card {
        border-bottom: 1px solid var(--border-color);
    }

    /* Optional Section */
    .optional-section {
        background: linear-gradient(135deg, rgba(107, 114, 128, 0.08), rgba(75, 85, 99, 0.08));
        border: 2px solid #6b7280;
        box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15);
    }

    .optional-section h2 {
        background: rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid var(--border-color);
    }

    .optional-section .task-card {
        border-bottom: 1px solid var(--border-color);
    }

    /* Reset Section */
    .reset-all-container {
        background: var(--card-bg);
        border: 2px solid #7f1d1d;
    }

    .btn-reset-daily,
    .btn-reset-all {
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-secondary);
    }

    .btn-reset-daily:hover,
    .btn-reset-all:hover {
        background: var(--text-secondary);
        color: var(--bg-color);
    }

    /* Menu Button */
    .menu-btn {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }

    .menu-btn:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.15);
    }

    /* Menu Modal */
    .menu-content {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .menu-header {
        border-bottom: 1px solid var(--border-color);
    }

    .menu-item {
        background: var(--card-bg);
        color: var(--text-primary);
    }

    .menu-item:hover {
        background: var(--surface-elevated, #1f1f23);
    }

    .menu-item.logout {
        border: 1px solid var(--danger-color);
    }

    .menu-item.logout:hover {
        background: rgba(248, 113, 113, 0.15);
    }

    /* Logout Button */
    .logout-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .logout-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }

    /* Auth Pages */
    .auth-container {
        background: linear-gradient(135deg, #1e3a8a, #1e293b);
    }

    .auth-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .auth-header h1 {
        color: var(--primary-color);
    }

    .auth-header p {
        color: var(--text-secondary);
    }

    .form-group input {
        background: var(--surface-elevated, #1f1f23);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
    }

    .form-group input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }

    .form-group label {
        color: var(--text-primary);
    }

    .form-group small {
        color: var(--text-secondary);
    }

    /* Segments & Notes */
    .last-note {
        background: rgba(96, 165, 250, 0.12);
        border-left: 3px solid var(--primary-color);
        color: var(--text-primary);
    }

    .btn-manage-dates {
        background: var(--primary-color);
    }

    .btn-manage-dates:hover {
        background: #3b82f6;
    }

    /* Modals */
    .modal-content {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .modal-content h3 {
        color: var(--text-primary);
    }

    .modal-content p {
        color: var(--text-secondary);
    }

    .modal-content textarea {
        background: var(--surface-elevated, #1f1f23);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
    }

    .modal-content textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }

    .modal-content input {
        background: var(--surface-elevated, #1f1f23);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
    }

    .modal-content input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }

    /* Note preview dark mode */
    .note-preview {
        background: var(--surface-elevated, #1f1f23);
    }

    /* Add date section dark mode */
    .add-date-section input[type="date"] {
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
        color-scheme: dark;
    }

    .add-date-section input[type="text"] {
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
    }

    .add-date-section input[type="date"]:focus,
    .add-date-section input[type="text"]:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }

    /* Note Formatting - use CSS variables */
    .note-formatting-guide {
        background: var(--surface-elevated, #1f1f23);
        border-color: var(--border-color);
    }

    .guide-item {
        background: var(--card-bg);
        border-color: var(--border-color);
    }

    /* Subtask Styles */
    .subtask-card::before {
        background: var(--card-bg);
    }

    .subtask-card::after {
        border-left: 2px solid #4b5563;
        border-bottom: 2px solid #4b5563;
    }

    .subtask-card .task-title {
        color: var(--text-secondary);
    }

    /* Warning Messages */
    .pending-skips-warning {
        background: #2d2414;
        border-left: 3px solid var(--warning-color);
        color: #fbbf24;
    }

    .reset-warning {
        color: var(--danger-color);
    }

    .auth-message.success {
        background: #1e3a2d;
        color: #86efac;
        border: 1px solid #166534;
    }

    .auth-message.error {
        background: #3f1d1d;
        color: #fca5a5;
        border: 1px solid #7f1d1d;
    }

    /* Additional hardcoded color fixes */
    .btn-primary {
        background: var(--primary-color);
    }

    .btn-primary:hover {
        background: #3b82f6;
    }

    .btn-complete-skipped {
        background: var(--secondary-color);
    }

    .btn-complete-skipped:hover {
        background: #4ade80;
    }

    .btn-add-date {
        background: var(--secondary-color);
    }

    .btn-add-date:hover {
        background: #4ade80;
    }

    .btn-bulk-import {
        background: #f59e0b;
    }

    .btn-bulk-import:hover {
        background: #d97706;
    }

    .btn-confirm {
        background: var(--primary-color);
    }

    .btn-confirm:hover {
        background: #3b82f6;
    }

    .btn-cancel,
    .btn-secondary {
        background: #6b7280;
    }

    .btn-cancel:hover,
    .btn-secondary:hover {
        background: #4b5563;
    }

    .btn-remove-date {
        background: var(--danger-color);
    }

    .btn-remove-date:hover {
        background: #ef4444;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card {
    animation: slideIn 0.3s ease;
}

/* Touch feedback */
.task-card:active {
    transform: scale(0.98);
}

.tab-btn:active {
    transform: scale(0.95);
}

/* Exam Countdown Timer */
.countdown-container {
    position: absolute;
    top: 8px;
    right: 60px;
    display: flex;
    gap: 6px;
    z-index: 101;
}

.exam-countdown {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.exam-countdown:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.exam-countdown:active {
    transform: scale(0.98);
}

.exam-countdown.expanded {
    min-width: 100px;
    padding: 8px 12px;
    gap: 4px;
}

.exam-countdown.expanded .countdown-days {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 2px;
}

.exam-countdown.expanded .countdown-days .days-label {
    font-size: 16px;
    font-weight: 700;
    opacity: 1;
}

.exam-countdown.expanded .countdown-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.6;
    text-align: center;
    white-space: nowrap;
}

.primary-countdown {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.primary-countdown:hover {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.countdown-days {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1px;
}

.countdown-label {
    font-size: 8px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Menu Button */
.menu-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 101;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
}

.menu-btn:active {
    transform: scale(0.95);
}

/* Menu Modal */
.menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    z-index: 1001;
    padding: 8px;
}

.menu-modal.hidden {
    display: none;
}

.menu-content {
    background: white;
    border-radius: 12px;
    width: 280px;
    max-width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    margin-top: 50px;
}

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

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.close-menu {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-menu:hover {
    background: var(--bg-color);
}

.menu-items {
    padding: 8px;
}

.menu-item {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.menu-item:hover {
    background: var(--bg-color);
}

.menu-item.logout {
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.menu-item.logout:hover {
    background: #fee;
}

/* Logout Button */
.logout-btn {
    position: fixed;
    top: 8px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 101;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.logout-btn:active {
    transform: scale(0.95);
}

/* Authentication Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #285aa0);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form h2 {
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 120, 200, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #285aa0;
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.btn-primary:active {
    transform: scale(0.98);
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-toggle a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Current Segment Display */
.current-segment {
    background: #eef1f4;
    color: #3a4753;
    border-left: 3px solid #c2c9d1;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.current-segment:hover {
    background: #e4e9ee;
}

.segment-header {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.segment-details {
    display: none;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #d0d7de;
    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
}

.current-segment.expanded .segment-details {
    display: block;
}

.segment-pages {
    color: var(--text-secondary);
    font-size: 10px;
    margin-left: 0;
}

.segment-category {
    display: inline-block;
    background: transparent;
    color: var(--text-secondary);
    padding: 0 3px;
    border-radius: 8px;
    font-size: 9px;
    margin-left: 0;
    font-weight: 600;
}

/* Last Note Display */
.last-note {
    background: rgba(var(--primary-color-rgb, 96, 165, 250), 0.08);
    border-left: 3px solid var(--primary-color);
    padding: 6px 10px;
    margin-top: 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-primary);
    font-style: italic;
    max-height: 2.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Custom Dates Display */
.custom-dates-info {
    background: #eef1f4;
    border-left: 3px solid #c2c9d1;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #3a4753;
    display: flex;
    align-items: center;
    gap: 2px;
    width: fit-content;
    flex-shrink: 0;
}

.btn-manage-dates {
    padding: 2px 8px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-manage-dates:hover {
    background: #2980b9;
}

.btn-manage-dates:active {
    transform: scale(0.95);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.dates-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dates-modal .modal-actions {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
}

.tasks-list-modal {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tasks-list-modal .modal-actions {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
}

.tasks-select-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.task-select-item {
    padding: 14px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.task-select-item:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.task-select-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.task-select-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.dates-container h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-top: 16px;
    margin-bottom: 12px;
}

.dates-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 16px;
    background: var(--bg-color);
}

.custom-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-primary);
}

.custom-date-item.past {
    opacity: 0.6;
}

.custom-date-item.completed {
    background: rgba(74, 222, 128, 0.15);
    color: var(--secondary-color);
}

.btn-remove-date {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-date:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.no-dates {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

.add-date-section {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid var(--border-color);
}

.bulk-import-section {
    background: rgba(251, 191, 36, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border: 2px solid var(--warning-color);
}

.bulk-import-section h4 {
    color: var(--warning-color);
    margin-top: 0 !important;
}

.bulk-import-section textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--warning-color);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
}

.bulk-import-section textarea:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.bulk-import-section textarea::placeholder {
    color: #999;
    font-size: 12px;
}

/* Bulk Delete Section */
.bulk-delete-section {
    background: rgba(239, 68, 68, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border: 2px solid var(--danger-color);
}

.bulk-delete-section h4 {
    color: var(--danger-color);
    margin-top: 0 !important;
    margin-bottom: 12px;
}

.bulk-delete-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-bulk-delete {
    flex: 1;
    min-width: 100px;
    padding: 10px 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--danger-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-bulk-delete:active {
    transform: scale(0.98);
}

.add-date-section input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.add-date-section input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 120, 200, 0.1);
}

.btn-add-date {
    width: 100%;
    padding: 10px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-date:hover {
    background: #3fa85f;
}

.btn-add-date:active {
    transform: scale(0.98);
}

.btn-bulk-import {
    width: 100%;
    padding: 10px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-bulk-import:hover {
    background: #f57c00;
}

.btn-bulk-import:active {
    transform: scale(0.98);
}

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

.modal-content h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 20px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-content textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.modal-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 120, 200, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-secondary {
    background: var(--text-secondary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover,
.btn-secondary:hover {
    background: #6c757d;
}

.btn-cancel:active,
.btn-secondary:active {
    transform: scale(0.98);
}

.btn-confirm {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm:hover {
    background: #285aa0;
}

.btn-confirm:active {
    transform: scale(0.98);
}

/* Subtask Styles */
.subtask-card {
    margin-left: 20px !important;
    margin-top: -4px !important;
    border-left: 3px solid var(--card-bg) !important;
    border-top: none !important;
    box-shadow: none !important;
    position: relative;
}

.subtask-card::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 0;
    width: 20px;
    height: 100%;
    background: var(--card-bg);
}

.subtask-card::after {
    content: '';
    position: absolute;
    left: -23px;
    top: 0;
    width: 20px;
    height: 24px;
    border-left: 2px solid #d0d0d0;
    border-bottom: 2px solid #d0d0d0;
    border-bottom-left-radius: 8px;
}

.subtask-indicator {
    display: none;
}

.subtask-card .task-title {
    font-size: 13px;
    color: #666;
}

.subtask-card .task-frequency {
    display: none;
}

@media (min-width: 768px) {
    .subtask-card {
        margin-left: 32px !important;
    }
    
    .subtask-card::before,
    .subtask-card::after {
        left: -35px;
        width: 32px;
    }
    
    .subtask-card .task-title {
        font-size: 16px;
    }
}

/* Note Formatting Styles */
.note-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.note-modal h3 {
    flex-shrink: 0;
}

.note-modal .modal-actions {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Manage Tasks Modal */
.manage-tasks-modal {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.manage-tasks-modal .modal-actions {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
}

.manage-tasks-buttons {
    padding: 20px 0;
}

.manage-tasks-buttons .btn-reset-daily,
.manage-tasks-buttons .btn-reset-all {
    width: 100%;
    margin-bottom: 8px;
    justify-content: center;
    font-size: 15px;
    padding: 12px 16px;
}

.manage-tasks-buttons .reset-description {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.manage-tasks-buttons .reset-warning {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: var(--danger-color);
    font-weight: 500;
}

.manage-tasks-buttons .reset-divider {
    margin: 20px 0;
}

.note-formatting-guide {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--border-color);
}

.guide-title {
    font-weight: 600;
    color: var(--text-primary);
}

.guide-item {
    padding: 4px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 11px;
}

.note-preview {
    padding: 12px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

.preview-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.preview-content strong,
.preview-content b {
    font-weight: 600;
    color: var(--text-primary);
}

.preview-content mark {
    background: #eef1f4;
    color: #505c68;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
    line-height: 1.3;
    display: inline;
}

/* Formatted text in task notes */
.task-notes strong,
.task-notes b {
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: none;
}

.task-notes mark {
    background: #eef1f4;
    color: #505c68;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
    line-height: 1.3;
    display: inline;
    pointer-events: none;
}

.last-note strong,
.last-note b {
    font-weight: 600;
    color: var(--text-primary);
}

.last-note mark {
    background: #eef1f4;
    color: #505c68;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
    line-height: 1.3;
    display: inline;
}

/* Dark mode overrides for formatted text and other elements */
@media (prefers-color-scheme: dark) {
    /* Subtask dark mode */
    .subtask-card::before {
        background: var(--card-bg);
    }
    
    .subtask-card::after {
        border-left: 2px solid #4b5563;
        border-bottom: 2px solid #4b5563;
    }

    .subtask-card .task-title {
        color: var(--text-secondary);
    }

    /* Menu dark mode */
    .menu-btn {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }

    .menu-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .menu-content {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }

    .menu-item {
        background: var(--card-bg);
        color: var(--text-primary);
    }

    .menu-item:hover {
        background: var(--surface-elevated, #1f1f23);
    }

    .menu-item.logout {
        border: 1px solid var(--danger-color);
    }

    .menu-item.logout:hover {
        background: rgba(248, 113, 113, 0.15);
    }

    /* Modal sticky buttons dark mode */
    @media (max-width: 767px) {
        .modal-actions {
            background: var(--card-bg) !important;
        }
    }

    .note-modal .modal-actions,
    .dates-modal .modal-actions,
    .tasks-list-modal .modal-actions,
    .manage-tasks-modal .modal-actions {
        background: var(--card-bg);
        border-top-color: var(--border-color);
    }
    
    /* Mark/highlight text dark mode */
    .preview-content mark,
    .task-notes mark,
    .last-note mark {
        background: rgba(96, 165, 250, 0.2);
        color: #e5e7eb;
    }
    
    /* BCS date item completed state */
    .bcs-date-item.completed .bcs-date-text,
    .bcs-date-item.completed .bcs-date-day,
    .bcs-date-item.completed .bcs-date-month {
        color: var(--secondary-color);
    }
    
    /* Scrollbar styling for dark mode */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--bg-color);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #3f3f46;
    }
}

/* Dates and Topics Container */
.dates-topics-container {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Exam Topics Compact Box - matches custom dates styling */
.exam-topics-compact {
    background: #eef1f4;
    border-left: 3px solid #c2c9d1;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #3a4753;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exam-topics-compact:hover {
    background: #e4e9ee;
}

.topics-text {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.topics-text.expanded {
    white-space: normal;
    word-break: break-word;
}

/* Topics badge in modal */
.topics-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

.date-info-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* Add topics input styling */
.add-date-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.add-date-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 120, 200, 0.1);
}

@media (min-width: 768px) {
    .exam-topics-header {
        padding: 10px 16px;
    }
    
    .topics-title {
        font-size: 14px;
    }
    
    .topics-count {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .topics-toggle {
        font-size: 12px;
    }
    
    .exam-topics-list {
        padding: 12px;
    }
    
    .topic-item {
        padding: 8px 12px;
        margin-bottom: 6px;
        font-size: 13px;
    }
}

/* Dark mode for topics */
@media (prefers-color-scheme: dark) {
    .exam-topics-compact {
        background: var(--surface-elevated, #1f1f23);
        border-left-color: var(--primary-color);
        color: var(--text-primary);
    }
    
    .exam-topics-compact:hover {
        background: var(--surface-hover, #27272a);
    }
    
    .topics-badge {
        background: var(--primary-color);
    }
    
    .custom-dates-info {
        background: var(--surface-elevated, #1f1f23);
        border-left-color: var(--primary-color);
        color: var(--text-primary);
    }
}

/* Subjects Rotation Display */
.subjects-rotation-container {
    margin-top: 10px;
}

.rotation-subject-header-expandable {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: #eef1f4;
    border-radius: 6px;
    border-left: 3px solid #c2c9d1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.rotation-subject-header-expandable:hover {
    background: #e4e9ee;
}

.rotation-subject-header-expandable .subject-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.rotation-subject-header-expandable strong {
    color: #3a4753;
    font-size: 11px;
    font-weight: 600;
}

.rotation-topics-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 8px;
    margin-top: 8px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.rotation-topics-list.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.rotation-topic {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-left: 2px solid #e1e8ed;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.rotation-topic.next-topic {
    color: var(--text-primary);
    font-weight: 600;
    background: #fff9e6;
    border-left-color: #f39c12;
    padding-left: 12px;
}

.rotation-topic.completed-topic {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Dark mode for subjects rotation */
@media (prefers-color-scheme: dark) {
    .rotation-subject-header-expandable {
        background: var(--surface-elevated, #1f1f23);
        border-left-color: var(--primary-color);
    }
    
    .rotation-subject-header-expandable:hover {
        background: var(--surface-hover, #27272a);
    }
    
    .rotation-subject-header-expandable strong {
        color: var(--text-primary);
    }
    
    .rotation-topic {
        border-left-color: var(--border-color);
    }
    
    .rotation-topic.next-topic {
        background: rgba(251, 191, 36, 0.15);
        border-left-color: var(--warning-color);
    }
    
    .current-segment {
        background: var(--surface-elevated, #1f1f23);
        color: var(--text-primary);
        border-left-color: var(--primary-color);
    }
    
    .current-segment:hover {
        background: var(--surface-hover, #27272a);
    }
    
    .segment-details {
        border-top-color: var(--border-color);
    }
}

@media (min-width: 768px) {
    .rotation-subject-header-expandable {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .rotation-subject-header-expandable .subject-label {
        font-size: 12px;
    }
    
    .rotation-subject-header-expandable strong {
        font-size: 12px;
    }
    
    .rotation-topics-list {
        gap: 5px;
        padding-left: 10px;
        margin-top: 10px;
    }
    
    .rotation-topic {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .rotation-topic.next-topic {
        padding-left: 14px;
    }
}

/* BCS Intelligence Date Table Section */
.bcs-dates-section {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(142, 68, 173, 0.08));
    border: 2px solid #9b59b6;
    border-radius: 12px;
    padding: 0;
    margin: -10px 16px 20px 16px;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bcs-dates-section.loaded {
    opacity: 1;
    visibility: visible;
}

.bcs-dates-section h2 {
    font-size: 14px;
    margin: 0;
    padding: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(155, 89, 182, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.bcs-dates-table-container {
    padding: 10px;
}

.bcs-dates-table {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
}

.bcs-date-item {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 4px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.bcs-date-item:hover {
    border-color: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.2);
}

.bcs-date-item.completed {
    background: #d4edda;
    border-color: var(--secondary-color);
}

.bcs-date-item.today {
    background: #fff9e6;
    border-color: #f39c12;
    font-weight: 600;
}

.bcs-date-item.past {
    opacity: 0.6;
}

.bcs-date-item.gap {
    background: transparent;
    border: 2px dashed #ddd;
    cursor: default;
    min-width: 60px;
}

.bcs-date-item.gap:hover {
    border-color: #ddd;
    transform: none;
    box-shadow: none;
}

.bcs-date-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
}

.bcs-date-day {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.bcs-date-month {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bcs-date-topics-preview {
    margin-top: 4px;
    font-size: 9px;
    color: #9b59b6;
    font-weight: 600;
}

.bcs-topics-modal {
    max-width: 500px;
}

.bcs-topics-modal .modal-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.bcs-topics-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.bcs-topics-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.bcs-no-dates {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 13px;
}

@media (min-width: 768px) {
    .bcs-dates-section {
        margin: -10px 20px 20px 20px;
    }
    
    .bcs-dates-table-container {
        padding: 12px;
    }
    
    .bcs-dates-table {
        gap: 6px;
    }
    
    .bcs-date-item {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .bcs-date-item.gap {
        min-width: 70px;
    }
    
    .bcs-date-text {
        font-size: 12px;
    }
}

/* Dark mode for BCS Date Table */
@media (prefers-color-scheme: dark) {
    .bcs-dates-section {
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(147, 51, 234, 0.12));
        border: 2px solid #a855f7;
        box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
    }
    
    .bcs-dates-section h2 {
        background: rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid var(--border-color);
    }
    
    .bcs-date-item {
        background: var(--card-bg);
    }
    
    .bcs-date-item:hover {
        border-color: #a855f7;
        box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
    }
    
    .bcs-date-item.completed {
        background: rgba(74, 222, 128, 0.15);
        border-color: var(--secondary-color);
    }
    
    .bcs-date-item.today {
        background: rgba(251, 191, 36, 0.15);
        border-color: var(--warning-color);
    }
    
    .bcs-date-item.gap {
        border-color: var(--border-color);
    }
    
    .bcs-date-item.gap:hover {
        border-color: var(--border-color);
        transform: none;
        box-shadow: none;
    }
    
    .bcs-date-topics-preview {
        color: #c084fc;
    }
    
    .bcs-topics-content {
        background: var(--surface-elevated, #1f1f23);
    }
}

/* Resource Links Styles */
.btn-resource {
    padding: 4px 10px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-resource:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f89);
    transform: scale(1.05);
}

.btn-resource:active {
    transform: scale(0.95);
}

/* Resource Links Section in Edit Modal */
.resource-links-section {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.resource-links-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.resource-links-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.resource-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--card-bg);
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid var(--border-color);
}

.resource-link-text {
    flex: 1;
    font-size: 13px;
    color: var(--primary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.btn-remove-resource {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-remove-resource:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.no-resources {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 12px;
    padding: 10px;
}

.add-resource-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-resource-form input {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.add-resource-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 120, 200, 0.1);
}

.btn-add-resource {
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-add-resource:hover {
    background: #3fa85f;
    transform: scale(1.05);
}

/* Resource Popup Modal */
.resource-popup-modal {
    max-width: 400px;
}

.resource-popup-task-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.resource-popup-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.resource-popup-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.resource-popup-link:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.resource-popup-icon {
    font-size: 16px;
}

.resource-popup-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-popup-arrow {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
}

/* Dark mode for Resource Links - additional adjustments */
@media (prefers-color-scheme: dark) {
    .btn-resource {
        background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    }
    
    .btn-resource:hover {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
    }
    
    .add-resource-form input {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .add-resource-form input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
    }
}

/* Exam Countdown Modal */
.exam-countdown-modal {
    max-width: 420px;
}

.exam-countdown-modal .modal-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.countdown-settings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.countdown-setting-item {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.countdown-setting-item:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: rgba(52, 120, 200, 0.05);
}

.countdown-setting-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.countdown-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.countdown-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.countdown-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.countdown-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.countdown-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.countdown-toggle input:checked + .toggle-slider {
    background-color: var(--secondary-color);
}

.countdown-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.countdown-setting-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.countdown-setting-fields .field-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.countdown-setting-fields label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 70px;
}

.countdown-setting-fields input[type="text"],
.countdown-setting-fields input[type="date"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.countdown-setting-fields input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 120, 200, 0.1);
}

.exam-countdown-modal .modal-actions {
    display: flex;
    gap: 10px;
}

.exam-countdown-modal .btn-secondary {
    flex: 1;
    padding: 12px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exam-countdown-modal .btn-secondary:hover {
    background: var(--card-bg);
    border-color: var(--text-secondary);
}

.exam-countdown-modal .btn-primary {
    flex: 1;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exam-countdown-modal .btn-primary:hover {
    background: #2563eb;
}

@media (prefers-color-scheme: dark) {
    .countdown-setting-item:has(input[type="checkbox"]:checked) {
        background: rgba(96, 165, 250, 0.1);
        border-color: #60a5fa;
    }
    
    .countdown-setting-fields input[type="text"],
    .countdown-setting-fields input[type="date"] {
        background: var(--bg-color);
    }
}
