:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient-1: #8ec5fc;
    --bg-gradient-2: #e0c3fc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --danger: #ef4444;
    --success: #22c55e;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;
    color: var(--text-primary);
}

/* Background animated shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(50px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.shape-1 {
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: linear-gradient(to bottom right, #a18cd1, #fbc2eb);
}

.shape-2 {
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: linear-gradient(to top right, #84fab0, #8fd3f4);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: linear-gradient(to top left, #fccb90, #d57eeb);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

/* Main Container */
.container {
    width: 90%;
    max-width: 500px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #1e293b, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

#date-display {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Input Area */
.input-group {
    display: flex;
    position: relative;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2);
}

input {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: transparent;
    border-radius: 15px 0 0 15px;
    color: var(--text-primary);
}

input::placeholder {
    color: #94a3b8;
}

#add-btn {
    border: none;
    background: var(--primary-color);
    color: white;
    width: 60px;
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

#add-btn:hover {
    background: var(--primary-hover);
}

#add-btn:active {
    transform: scale(0.95);
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* Todo List */
.todo-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar aesthetic */
.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: transparent;
}

.todo-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.todo-item.completed {
    background: #f8fafc;
    opacity: 0.8;
}

.todo-item.completed span {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.checkbox {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.checkbox:checked {
    background-color: var(--success);
    border-color: var(--success);
}

.checkbox:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.todo-text {
    flex: 1;
    font-size: 1.05rem;
    word-break: break-all;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 1rem;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.timer-display {
    min-width: 65px;
    text-align: center;
}

.timer-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.timer-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.todo-item.timer-active {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.todo-item.timer-active .timer-btn {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.delete-btn {
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.2s;
    opacity: 0;
}

.todo-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    color: var(--danger);
    transform: scale(1.1);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

#clear-completed {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

#clear-completed:hover {
    color: var(--danger);
}

/* Animations for removing */
.fall {
    transform: translateX(10rem) rotateZ(20deg);
    opacity: 0;
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }
}