/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 2rem;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 700;
}

.date-display {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 500;
}

/* Progress section */
.progress-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    font-size: 1rem;
}

/* Tasks section */
.tasks-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.tasks-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.task-category {
    margin-bottom: 25px;
}

.task-category:last-child {
    margin-bottom: 0;
}

.task-category h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.task-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.task-item.completed {
    background: #f0fff4;
    border-color: #48bb78;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #68d391;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #48bb78;
    transform: scale(1.2);
}

.task-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
}

.task-text {
    color: #2d3748;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.task-time {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: #fed7d7;
    color: #c53030;
}

.btn-danger:hover {
    background: #feb2b2;
    transform: translateY(-2px);
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    .tasks-section {
        padding: 20px;
    }
    
    .task-item {
        padding: 12px;
    }
    
    .task-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .task-time {
        font-size: 0.8rem;
        color: #a0aec0;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Animation for completed tasks */
@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.task-checkbox:checked {
    animation: checkmark 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    margin: 0;
    color: #4a5568;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.setting-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #667eea;
}

.setting-item select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #4a5568;
    transition: border-color 0.3s ease;
}

.setting-item select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
}

/* Pulse animation for task highlighting */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    header, .progress-section, .tasks-section {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    h1, h2, h3 {
        color: #e2e8f0;
    }
    
    .task-item {
        background: #2d3748;
    }
    
    .task-item:hover {
        background: #4a5568;
    }
    
    .task-item.completed {
        background: #22543d;
    }
    
    .task-text {
        color: #e2e8f0;
    }
    
    .task-time {
        color: #a0aec0;
    }
    
    .modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .modal-header {
        border-bottom-color: #4a5568;
    }
    
    .modal-header h3 {
        color: #e2e8f0;
    }
    
    .modal-close {
        color: #a0aec0;
    }
    
    .modal-close:hover {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .modal-footer {
        border-top-color: #4a5568;
    }
    
    .setting-item label {
        color: #e2e8f0;
    }
    
    .setting-item select {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .setting-item select:focus {
        border-color: #667eea;
    }
}
