:root {
    /* Category Colors - Light Mode */
    --color-people: #52E382;
    --color-free-time: #D3D2FF;
    --color-work: #FF9191;
    --color-duties: #FFCC25;
    --color-other: #D9D9D9;
    --edit-clr: #F670C0;
    --edit-clr-hover: #fb95d2;
    --edit-clr-shadow: #f670c069;
    --favourite-clr: #fff200;
}


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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #4d4d4d !important;
    color: #bda3a3;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}


.app-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100svh;
    position: relative;
}

.dark-mode-toggle {
    background: none;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 4px;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode-toggle.dark {
    color: #ff9500;
}

.dark-mode-toggle.dark:hover {
    background: rgba(255, 149, 0, 0.1);
}

.mobile-app {
    max-width: 375px;
    height: 100vh;
    height: 100svh;
    max-height: 900px;
    background: white;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-app::-webkit-scrollbar {
    display: none;
}

body.dark-mode .mobile-app {
    background: #1c1c1e;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}


body.dark-mode .task-details {
    color: rgba(0, 0, 0, 0.511);
}

body.dark-mode .task-detail i {
    color: rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-content {
    background: #1c1c1e;
}

body.dark-mode .modal-header h2 {
    color: #fff;
}

body.dark-mode .form-group label {
    color: #fff;
}

body.dark-mode .form-group input {
    background: #1c1c1e;
    border-color: #38383a;
    color: #fff;
}

body.dark-mode .form-group input:focus {
    background: #2c2c2e;
}

body.dark-mode .empty-state h3 {
    color: #858585;
}

/* Status Bar */
.status-bar {
    background: #000;
    color: #fff;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    height: 44px;
    position: sticky;
    border-radius: 20px 20px 0 0;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* App Header */
.app-header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-family: 'Inria Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #000;
    margin: 0;
    letter-spacing: -0.3px;
}

body.dark-mode .app-title {
    color: #ffffff;
}

.settings-btn {
    background: none;
    color: #8e8e93;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 6px;
}

.settings-btn:hover {
    background: rgba(142, 142, 147, 0.1);
    color: #000;
    transform: rotate(90deg);
}

body.dark-mode .settings-btn {
    color: #aeaeae;
}

body.dark-mode .settings-btn:hover {
    background: rgba(174, 174, 174, 0.1);
    color: #fff;
}

/* Floating Add Button */
.floating-add-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.floating-add-btn {
    background: var(--edit-clr);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--edit-clr-shadow);
}

.floating-add-btn:hover {
    background: var(--edit-clr-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 25px var;
}

/* Filter Tabs */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 25px;
}

/* Time Scrubber */
.time-scrubber {
    background: #f8f9fa;
    margin: 0 20px 20px;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e5e5ea;
    text-align: center;
    position: absolute;
    bottom: 0px;
    left: -370px;
    right: 420px;
    display: none; /* Hidden by default, shown via JavaScript when enabled */
}

body.dark-mode .time-scrubber {
    background: #2c2c2e;
    border-color: #38383a;
}

.scrubber-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

.scrubber-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scrubber-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

body.dark-mode .scrubber-header h3 {
    color: #fff;
}

.reset-time-btn {
    background: #007AFF;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reset-time-btn:hover {
    background: #0056CC;
    transform: scale(1.05);
}

.clear-all-btn {
    background: #ff3b30;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: #d70015;
    transform: scale(1.05);
}

.minimize-btn {
    background: #007AFF;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.minimize-btn:hover {
    background: #0056CC;
    transform: scale(1.05);
}

.minimize-btn.minimized {
    transform: rotate(180deg);
}

.scrubber-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.scrubber-content.minimized {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
}

.scrubber-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scrubber-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scrubber-group label {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    min-width: 50px;
}

body.dark-mode .scrubber-group label {
    color: #fff;
}

.scrubber-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e5ea;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

body.dark-mode .scrubber-slider {
    background: #38383a;
}

.scrubber-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007AFF;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
    transition: all 0.2s ease;
}

.scrubber-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 122, 255, 0.4);
}

.scrubber-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007AFF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

.scrubber-value {
    font-size: 14px;
    font-weight: 600;
    color: #007AFF;
    min-width: 30px;
    text-align: center;
}

.current-time-display {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5ea;
    text-align: center;
}

body.dark-mode .current-time-display {
    border-color: #38383a;
}

#currentTimeDisplay {
    font-size: 14px;
    color: #8e8e93;
    font-weight: 500;
}

body.dark-mode #currentTimeDisplay {
    color: #aeaeae;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    padding-inline: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
}

.priority-icon {
    color: #7b7b7b;
    font-size: 24px;
    flex-shrink: 0;
    margin-right: 8px;
    position: absolute;
    top: 155px;
    left: 18px;
    z-index: 100;
}

body.dark-mode .priority-icon {
    color: #aeaeae;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    background: #e5e5ea;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 15px;
}

.filter-tab.active {
    color: rgb(0, 0, 0);
}

/* Filter tab colors - using CSS variables */
.filter-tab[data-filter="people"],
.task-item.people,
.category-option.people-clr {
    background: var(--color-people);
}

.filter-tab[data-filter="people"].active {
    background: var(--color-people);
}

.filter-tab[data-filter="people"]:not(.active) {
    background: var(--color-people);
    opacity: 0.3;
}

.filter-tab[data-filter="free-time"],
.task-item.free-time,
.category-option.free-time-clr {
    background: var(--color-free-time);
}

.filter-tab[data-filter="free-time"].active {
    background: var(--color-free-time);
}

.filter-tab[data-filter="free-time"]:not(.active) {
    background: var(--color-free-time);
    opacity: 0.3;
}

.filter-tab[data-filter="work"],
.task-item.work,
.category-option.work-clr {
    background: var(--color-work);
}

.filter-tab[data-filter="work"].active {
    background: var(--color-work);
}

.filter-tab[data-filter="work"]:not(.active) {
    background: var(--color-work);
    opacity: 0.3;
}

.filter-tab[data-filter="duties"],
.task-item.duties,
.category-option.duties-clr {
    background: var(--color-duties);
}

.filter-tab[data-filter="duties"].active {
    background: var(--color-duties);
}

.filter-tab[data-filter="duties"]:not(.active) {
    background: var(--color-duties);
    opacity: 0.3;
}

.filter-tab[data-filter="other"],
.task-item.other,
.category-option.other-clr {
    background: var(--color-other);
}

.filter-tab[data-filter="other"].active {
    background: var(--color-other);
}

.filter-tab[data-filter="other"]:not(.active) {
    background: var(--color-other);
    opacity: 0.3;
}

.filter-tab[data-filter="personal-priority"] {
    background: var(--favourite-clr);
    color: #000;
    font-size: 16px;
    padding: 8px 12px;
}

.filter-tab[data-filter="personal-priority"].active {
    background: var(--favourite-clr);
    color: #000;
}

.filter-tab[data-filter="personal-priority"]:not(.active) {
    background: var(--favourite-clr);
    opacity: 0.3;
    color: #000;
}

.filter-tab[data-filter="completed"] {
    background: #8e8e93;
}

.filter-tab[data-filter="completed"].active {
    background: #8e8e93;
}

.filter-tab[data-filter="completed"]:not(.active) {
    background: #8e8e93;
    opacity: 0.3;
}

/* Task List Container */
.task-list-container {
    flex: 1;
    padding: 0;
    overflow-y: scroll;
}

.task-list-container::-webkit-scrollbar {
    display: none;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Task Container */
.task-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform-origin: center;
}

/* Swipe Container */
.swipe-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.swipe-container.swiped {
    transform: translateX(-80px);
}

.swipe-container.swiped .swipe-actions {
    right: -20px;
}

/* Swipe Actions */
.swipe-actions {
    position: absolute;
    right: -100px;
    top: 0;
    bottom: 0;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff3b30;
    border-radius: 1.5rem;
    margin-left: 8px;
    transition: right 0.3s ease;
}

.swipe-delete-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.swipe-delete-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.task-container::before {
    content: '';
    position: absolute;
    left: 29px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 4px,
            #d1d1d6 4px,
            #d1d1d6 12px);
    z-index: 1;
}

/* Hide dashed line for completed tasks */
.task-container:has(.task-item.completed)::before {
    display: none;
}

.task-container:first-of-type::before {
    top: 10px;
}

.task-container:last-of-type::before {
    bottom: 50%;
}

/* Apply last-of-type styling to the last visible (non-completed) task */
.task-container:not(:has(.task-item.completed)):last-of-type::before,
.task-container.last-visible::before {
    bottom: 50%;
}

body.dark-mode .task-container::before {
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 4px,
            #ffffff1d 4px,
            #ffffff1d 8px);
}

/* Task Items */
.task-item {
    background: white;
    padding: 16px 20px;
    border-radius: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-left: 8px;
}

/* Animation classes for task position changes */
.task-container.moving-up {
    transform: translateY(-100%);
    opacity: 0.7;
}

.task-container.moving-down {
    transform: translateY(100%);
    opacity: 0.7;
}

.task-container.animating {
    z-index: 10;
}

.task-container.new-task {
    animation: slideInFromTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-container.removed-task {
    animation: slideOutToBottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(100%);
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutToBottom {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Category-specific box shadows for all tasks */
.task-item.people {
    box-shadow: 0 4px 16px rgba(82, 227, 130, 0.5);
}

body.dark-mode .task-item.people {
    box-shadow: 0 4px 16px rgba(82, 227, 130, 0.3);
}

.task-item.free-time {
    box-shadow: 0 4px 16px rgba(211, 210, 255, 0.8);
}

body.dark-mode .task-item.free-time {
    box-shadow: 0 4px 16px rgba(211, 210, 255, 0.3);
}

.task-item.work {
    box-shadow: 0 4px 16px rgba(255, 145, 145, 0.8);
}

body.dark-mode .task-item.work {
    box-shadow: 0 4px 16px rgba(255, 145, 145, 0.3);
}

.task-item.duties {
    box-shadow: 0 4px 16px rgba(255, 204, 37, 0.8);
}

body.dark-mode .task-item.duties {
    box-shadow: 0 4px 16px rgba(255, 204, 37, 0.3);
}

.task-item.other {
    box-shadow: 0 4px 16px rgba(217, 217, 217, 0.8);
}

body.dark-mode .task-item.other {
    box-shadow: 0 4px 16px rgba(217, 217, 217, 0.3);
}

/* Next Task Indicator */
.task-item.next-task {
    /* border: 2px solid #007AFF; */
    position: relative;
}

:not(.task-item.next-task) {
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0) !important;
}

.task-item.next-task::before {
    content: 'DO THIS FIRST';
    position: absolute;
    top: -8px;
    left: 16px;
    background: linear-gradient(135deg, #f4746d 0%, #5997d9 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 10;
}

body.dark-mode .task-item.next-task {
    border-color: #0A84FF;
}

body.dark-mode .task-item.next-task::before {
    background: linear-gradient(135deg, #f4746d 0%, #5997d9 100%);
}

.task-item:hover {
    transform: translateY(-1px);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-name {
    text-decoration: line-through;
}

/* Priority Dot */
.priority-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

/* Remove box shadow for transparent dots (no due date) */
.priority-dot[style*="background-color: transparent"] {
    box-shadow: none;
}

/* Hide priority dot when task is completed */
.task-container:has(.task-item.completed) .priority-dot {
    opacity: 0;
    visibility: hidden;
}

/* Pulsating effect for critical tasks */
.priority-dot.critical {
    animation: pulse 1.5s ease-in-out infinite;
}

.priority-dot.critical::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 4px solid currentColor;
    opacity: 0.6;
    animation: pulse-ring 1.5s ease-in-out infinite;
}

.priority-dot.critical::after {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    border: 3px solid currentColor;
    opacity: 0.3;
    animation: pulse-ring 1.5s ease-in-out infinite 0.3s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.0);
        opacity: 0.8;
    }

    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}


.priority-dot.high {
    background: #ff3b30;
}

.priority-dot.medium {
    background: #ff9500;
}

.priority-dot.low {
    background: #34c759;
}

/* Checkbox */
.task-checkbox {
    width: 25px;
    height: 25px;
    border: 2px solid #d1d1d6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-checkbox.checked {
    background: #007AFF;
    border-color: #007AFF;
    color: white;
}

.task-checkbox:hover {
    border-color: #007AFF;
}

/* Task Content */
.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-name {
    font-size: 17px;
    font-weight: 400;
    color: #000;
    line-height: 1.3;
}

.task-details {
    display: flex;
    flex-direction: row;
    gap: 12px;
    row-gap: 3px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
    flex-wrap: wrap;
}

.task-detail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-detail i {
    width: 12px;
    text-align: center;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
}




.time-remaining.overdue {
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.modal-content {
    background-color: #ffffff;
    position: absolute;
    bottom: 0;
    top:30px;
    left: 10px;
    right: 10px;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
}

.modal-content::-webkit-scrollbar {
    display: none;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5ea;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.back-btn {
    background: none;
    border: none;
    color: var(--edit-clr);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.back-btn:hover {
    background: #f0f0f0;
}

.delete-btn-header {
    background: none;
    border: none;
    color: #ff3b30;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.delete-btn-header:hover {
    background: #ffe6e6;
}

.header-spacer {
    width: 34px;
    grid-column: 3;
    justify-self: end;
}

.task-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #000;
    font-size: 16px;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid #d1d1d6;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Duration Inputs */
.duration-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duration-inputs input {
    flex: 1;
    text-align: center;
}

.duration-separator {
    font-size: 18px;
    font-weight: 600;
    color: #8e8e93;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #000;
    font-size: 16px;
    margin-bottom: 8px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d1d6;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background: var(--edit-clr);
    border-color: var(--edit-clr);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(30deg);
}

/* Due Date Container */
.due-date-container {
    margin-top: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
}

.date-time-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-inputs input {
    flex: 1;
    text-align: center;
}

.time-separator {
    font-size: 18px;
    font-weight: 600;
    color: #8e8e93;
}

/* Recurring Container */
.recurring-container {
    margin-top: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
}

.recurring-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recurring-inputs span {
    font-size: 14px;
    color: #8e8e93;
}

.recurring-inputs input {
    width: 60px;
    text-align: center;
}

.recurring-inputs select {
    padding: 8px 12px;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #000;
    cursor: pointer;
}

.recurring-inputs select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Dark mode styles for new elements */
body.dark-mode .due-date-container,
body.dark-mode .recurring-container {
    background: #2c2c2e;
    border-color: #38383a;
}

body.dark-mode .checkbox-label {
    color: #fff;
}

body.dark-mode .checkmark {
    background: #1c1c1e;
    border-color: #38383a;
}

body.dark-mode .recurring-inputs select {
    background: #1c1c1e;
    border-color: #38383a;
    color: #fff;
}

body.dark-mode .recurring-inputs span {
    color: #aeaeae;
}

/* Recurring Task Icon */
.recurring-icon {
    margin-left: 8px;
    font-size: 12px;
    color: #007AFF;
    opacity: 0.7;
}

body.dark-mode .recurring-icon {
    color: #0A84FF;
}

/* Personal Priority Icon */
.personal-priority-icon {
    margin-left: 3px;
    font-size: 15px;
    color: var(--favourite-clr);
    opacity: 0.9;
}

body.dark-mode .personal-priority-icon {
    color: var(--favourite-clr);
}

/* Random Priority Icon */
.random-priority-icon {
    margin-left: 3px;
    font-size: 13px;
    color: #8e8e93;
    opacity: 0.8;
}

body.dark-mode .random-priority-icon {
    color: #aeaeae;
}

/* Category Selector */
.category-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-option {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: .5;
}

.category-option:hover {
    opacity: 1;
}

.category-option.selected {
    opacity: 1;
}

.category-option i {
    font-size: 20px;
    color: #000;
}

.modal-actions {
    margin-top: 20px;
}

.submit-btn {
    width: 100%;
    background: var(--edit-clr);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: var(--edit-clr-hover);
}

.submit-btn:disabled {
    background: #d1d1d6;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8e8e93;
    margin: 20px;
    border-radius: 16px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #000;
}

.empty-state p {
    font-size: 16px;
}

/* Settings Modal */
.settings-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5ea;
}

body.dark-mode .settings-section h3 {
    color: #fff;
    border-color: #38383a;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-description {
    font-size: 14px;
    color: #8e8e93;
    margin: 0;
    margin-left: 32px;
    line-height: 1.4;
}

body.dark-mode .setting-description {
    color: #aeaeae;
}

.work-hours-config {
    margin-left: 32px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

body.dark-mode .work-hours-config {
    background: #2c2c2e;
    border-color: #38383a;
}

.time-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    min-width: 60px;
}

body.dark-mode .time-input-group label {
    color: #fff;
}

.time-input-group input {
    width: 50px;
    padding: 8px;
    border: 1px solid #d1d1d6;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    background: #ffffff;
}

body.dark-mode .time-input-group input {
    background: #1c1c1e;
    border-color: #38383a;
    color: #fff;
}

.time-input-group input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.time-input-group span {
    font-size: 16px;
    font-weight: 600;
    color: #8e8e93;
}

body.dark-mode .time-input-group span {
    color: #aeaeae;
}

.work-days-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-days-config > label {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

body.dark-mode .work-days-config > label {
    color: #fff;
}

.day-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #000;
}

body.dark-mode .day-checkbox {
    color: #fff;
}

.day-checkbox input[type="checkbox"] {
    display: none;
}

.day-checkbox span {
    padding: 6px 12px;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

body.dark-mode .day-checkbox span {
    background: #1c1c1e;
    border-color: #38383a;
    color: #fff;
}

.day-checkbox input[type="checkbox"]:checked + span {
    background: var(--edit-clr);
    border-color: var(--edit-clr);
    color: white;
}

.day-checkbox:hover span {
    border-color: #007AFF;
}

footer {
    text-align: center;
    color: black;
    font-size: 12px;
    padding: 10px;
}

body.dark-mode footer {
    color: white;
}

/* Responsive adjustments for larger screens */
@media (min-width: 768px) {

    .mobile-app {
        max-width: 414px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }

    body.dark-mode .mobile-app {
        box-shadow: 0 20px 60px rgba(255, 255, 255, 0.1);
    }

    .status-bar {
        border-radius: 20px 20px 0 0;
    }
}

@media (max-width: 768px) {

    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .status-bar {
        display: none;
    }

    .priority-icon {
        top: 112px;
    }

    .task-item:hover {
        transform: translateY(0px);
    }

    .time-scrubber {
        position: static;
    }
}