:root {
    --color-primary: #213448;
    --color-secondary: #94B4C1;
    --color-background: #fdfae2;
    --color-card: #A7BCC7;
    --color-text: #213448;
    --font-handwriting:  'Poppins', sans-serif;
    --font-logo: 'Satisfy', cursive;
    --color-success: #4CAF50;
    --color-error: #F44336;
    --color-warning: #FF9800;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* welcome animation */
#splash-screen {
    height: 100vh;
    width: 100%;
    position: fixed;
    inset: 0;
    background: var(--color-background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 9000;
    animation: fadeOut 1s ease-out 2s forwards;
}

#logo {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 3.1rem;
    font-weight: 700;
    color: var(--color-primary);
    animation: pulse 2s ease-in-out infinite;
    text-align: center;
}
#logo span {
    color: var(--color-secondary);
    font-family: var(--font-logo);
    text-shadow: 0 0 5px var(--color-primary), 0 0 10px rgb(247, 247, 254), 0 0 15px rgb(176, 183, 255);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--color-primary);
    animation: loading 1.5s infinite;
}

/* Welcome Animation */
.welcome-animation {
    text-align: center;
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}


/* Animations */
@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: var(--color-primary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-family: var(--font-logo);
    font-size: 1.8rem;
    color: white;
    font-weight: normal;
}

.header h1 span {
    color: var(--color-secondary);
    font-family: var(--font-handwriting);
    text-shadow: 0 0 5px rgb(0, 0, 0), 0 0 10px rgb(148, 200, 242), 0 0 0px rgb(197, 236, 255);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 250px;
    padding: 20px;
    border-right: 2px solid var(--color-card);
}

.sidebar h2 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.task-filter {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: transparent;
    border: none;
    text-align: left;
    font-family: var(--font-handwriting);
    font-size: 1.2rem;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 8px;
}

.task-filter:hover {
    background-color: var(--color-card);
}

.task-filter.active {
    background-color: var(--color-card);
    font-weight: bold;
}

.progress-section {
    margin-top: 2rem;
    font-family: var(--font-handwriting);
}

.progress-done {
    font-size: 1.1rem;
    color: var(--color-text);
}

.progress-message {
    color: var(--color-text);
    font-style: italic;
    margin-top: 5px;
}

.progress-bar {
    margin-top: 10px;
    height: 10px;
    background-color: var(--color-secondary);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background-color: var(--color-primary);
    width: 0%;
    /* Start at 0% and animate */
    transition: width 0.8s ease-in-out;
}

/* notifications */
.notification {
    position: absolute;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease-out;
    font-family: var(--font-handwriting);
}

.notification-message {
    color: white;
    font-size: 1.1rem;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Task List */
.task-list {
    flex: 1;
    padding: 20px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.task-header h2 {
    font-family: var(--font-handwriting);
    font-size: 1.8rem;
    color: var(--color-text);
}

.task-actions {
    display: flex;
    gap: 10px;
}

.action-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-family: var(--font-handwriting);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.delete-task {
    background-color: var(--color-primary);
}

.add-task {
    background-color: var(--color-primary);
}

.cancel-delete,
.cancel-task {
    background-color: var(--color-error);
}

.submit-task {
    background-color: var(--color-success);
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.task-card {
    background-color: var(--color-card);
    padding: 20px;
    border-radius: 15px;
    position: relative;
    min-height: 150px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Replace the completeTask animation with static styling */
.task-card.task-completed {
    background-color: #d4edda;
    border-left: 4px solid var(--color-success);
    opacity: 0.8;
}

.task-title {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 10px;
    font-family: var(--font-handwriting);
}

.task-desc {
    color: var(--color-text);
    font-family: var(--font-handwriting);
    margin-bottom: 15px;
    flex-grow: 1;
}

.task-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--color-primary);
    appearance: none;
    cursor: pointer;
    display: none;
    /* Hidden by default */
    z-index: 1;
}

.task-checkbox:checked {
    background: var(--color-error);
    border: none;
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    z-index: 998;
}

.new-task {
    background-color: var(--color-card);
    padding: 2.5rem;
    border-radius: 15px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-handwriting);
    display: none;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.new-task h3 {
    margin-bottom: 20px;
    color: var(--color-text);
    font-size: 1.5rem;
}

.new-task input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--color-primary);
    margin-bottom: 15px;
    font-family: var(--font-handwriting);
    font-size: 1.1rem;
    background-color: rgba(255, 255, 255, 0.9);
}

.new-task input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(33, 52, 72, 0.2);
}

.new-task .task-actions {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.new-task .action-button {
    margin: 5px;
    min-width: 120px;
    justify-content: center;
}

.task-card {
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.task-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.task-card .edit-hint {
    display: none;
    position: absolute;
    top: 8px;
    right: 50px;
    color: #888;
    font-size: 1.1em;
    background: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    pointer-events: none;
    z-index: 2;
}
.task-card:hover .edit-hint {
    display: inline;
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.page-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-handwriting);
    transition: all 0.3s ease;
}

.page-button:hover {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

.page-button.active {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-weight: bold;
    box-shadow: 0 0 0 2px var(--color-primary);
}

#coming-up-tasks {
    display: none;
}

.task-date {
    font-family: var(--font-handwriting);
    font-size: 0.9rem;
    color: var(--color-text);
    opacity: 0.8;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed rgba(33, 52, 72, 0.3);
}

input.task-date {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--color-primary);
    margin-bottom: 20px;
    font-family: var(--font-handwriting);
    font-size: 1.1rem;
    border-top: 1px solid var(--color-primary);
    opacity: 1;
}

#today-tasks .new-task .task-date {
    display: none !important;
}

.task-date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

.completed-task {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-handwriting);
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.completed-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.completed-task.completed {
    background-color: var(--color-success);
}

/* Responsive adjustments */
@media (max-width: 968px) {
    
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--color-card);
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .new-task {
        min-width: 90%;
        max-width: 90%;
    }



    .add-task, .delete-task, .cancel-delete{
        padding: 8px 10px;
        border: none;
        border-radius: 3px;
        color: white;
        cursor: pointer;
        font-family: var(--font-handwriting);
        font-size: 0.6rem;
        display: flex;
        align-items: center;
        gap: 3px;
        transition: all 0.3s ease;
    }

    
    
    .task-header h2 {
        font-size: 1.2rem;
    }
}
