body {
    overscroll-behavior-y: contain;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.checklist li {
    position: relative;
    padding-left: 0;
    list-style: none;
}

.checklist label {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    color: #334155;
    padding: 0.75rem 1rem;
    padding-left: 3.5rem;
    line-height: 1.6;
    position: relative;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
}

html.dark .checklist label {
    color: #cbd5e1;
}

.checklist label:hover {
    background-color: rgba(6, 182, 212, 0.08);
    transform: translateX(4px);
}

html.dark .checklist label:hover {
    background-color: rgba(34, 211, 238, 0.1);
}

.checklist input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checklist label::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    border: 2.5px solid #94a3b8;
    border-radius: 0.5rem;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    background-color: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

html.dark .checklist label::before {
    border-color: #475569;
    background-color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.checklist input[type="checkbox"]:checked ~ label::before,
.checklist label:has(input[type="checkbox"]:checked)::before {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-color: #06b6d4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.1rem;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15), 0 4px 12px rgba(6, 182, 212, 0.3);
    transform: translateY(-50%) scale(1.1);
}

html.dark .checklist input[type="checkbox"]:checked ~ label::before,
html.dark .checklist label:has(input[type="checkbox"]:checked)::before {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    border-color: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2), 0 4px 16px rgba(34, 211, 238, 0.4);
}

.checklist input[type="checkbox"]:focus ~ label::before,
.checklist label:has(input[type="checkbox"]:focus)::before {
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25);
}

html.dark .checklist input[type="checkbox"]:focus ~ label::before,
html.dark .checklist label:has(input[type="checkbox"]:focus)::before {
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.25);
}

.checklist input[type="checkbox"]:checked ~ label,
.checklist label:has(input[type="checkbox"]:checked) {
    color: #06b6d4;
    text-decoration: line-through;
    text-decoration-color: #06b6d4;
    text-decoration-thickness: 2px;
    text-decoration-style: solid;
    opacity: 0.7;
    background-color: rgba(6, 182, 212, 0.05);
}

html.dark .checklist input[type="checkbox"]:checked ~ label,
html.dark .checklist label:has(input[type="checkbox"]:checked) {
    color: #22d3ee;
    text-decoration-color: #22d3ee;
    background-color: rgba(34, 211, 238, 0.08);
}

.checklist input[type="checkbox"]:checked ~ label::after,
.checklist label:has(input[type="checkbox"]:checked)::after {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: #06b6d4;
    font-weight: bold;
    animation: checkmark-pop 0.3s ease;
}

html.dark .checklist input[type="checkbox"]:checked ~ label::after,
html.dark .checklist label:has(input[type="checkbox"]:checked)::after {
    color: #22d3ee;
}

@keyframes checkmark-pop {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

.priority-high::before {
    content: '🔴';
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.priority-medium::before {
    content: '🟡';
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.priority-low::before {
    content: '🟢';
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difficulty-badge.easy {
    background-color: #dcfce7;
    color: #166534;
}

html.dark .difficulty-badge.easy {
    background-color: #14532d;
    color: #86efac;
}

.difficulty-badge.medium {
    background-color: #fef3c7;
    color: #92400e;
}

html.dark .difficulty-badge.medium {
    background-color: #78350f;
    color: #fde047;
}

.difficulty-badge.hard {
    background-color: #fee2e2;
    color: #991b1b;
}

html.dark .difficulty-badge.hard {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.task-tip {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #0c4a6e;
}

html.dark .task-tip {
    background-color: #082f49;
    border-left-color: #38bdf8;
    color: #bae6fd;
}

.task-tip strong {
    font-weight: 600;
}

.task-tip a {
    text-decoration: underline;
}

.resource-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.resource-link:hover {
    background-color: #0ea5e9;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
    border-color: #0ea5e9;
}

html.dark .resource-link {
    background-color: #0c4a6e;
    color: #7dd3fc;
}

html.dark .resource-link:hover {
    background-color: #0369a1;
    color: white;
    box-shadow: 0 10px 20px rgba(3, 105, 161, 0.4);
    border-color: #38bdf8;
}

.timer-display {
    font-weight: 600;
    color: #06b6d4;
}

html.dark .timer-display {
    color: #22d3ee;
}

.timer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.timer-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.notes-toggle-btn {
    transition: all 0.2s ease;
}

.notes-toggle-btn:hover {
    transform: translateX(4px);
}

.phase-notes-textarea {
    transition: all 0.3s ease;
}

.phase-notes-textarea.show {
    display: block !important;
}

.resources-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phase-section .toggle-button svg {
    transition: transform 0.3s ease-in-out;
}

.phase-section.expanded .toggle-button svg {
    transform: rotate(180deg);
}

.tasks-container {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

.phase-section.expanded .tasks-container {
    max-height: 15000px;
    opacity: 1;
}

.task-group {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.task-group:hover {
    background-color: rgba(6, 182, 212, 0.03);
    transform: translateX(2px);
}

html.dark .task-group:hover {
    background-color: rgba(34, 211, 238, 0.05);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06b6d4, #0891b2);
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0891b2, #0e7490);
}

html.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

html.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22d3ee, #06b6d4);
    border: 2px solid #1e293b;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #06b6d4, #0891b2);
}

#resetConfirmationModal {
    z-index: 1000;
}

* {
    transition-property: background-color, border-color, color;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}

.preload * {
    transition: none !important;
}

.phase-section {
    transition: all 0.3s ease;
}

.phase-section:hover {
    transform: translateY(-2px);
}

#progressBar {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

html.dark #progressBar {
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.6);
}

button {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.97);
}
