:root {
    --bg-color: #0b0f19;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-color: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Animated Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.4);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(37, 99, 235, 0.3);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 50px); }
}

/* Glassmorphism Container */
.glass-container {
    width: 100%;
    max-width: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

#date-display {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

#task-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#task-input::placeholder {
    color: var(--text-secondary);
}

#task-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

#add-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    width: 54px;
    height: 54px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-color);
    background: #7c3aed;
}

#add-btn:active {
    transform: translateY(0);
}

/* Todo List */
.todos-wrapper {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

/* Scrollbar styling */
.todos-wrapper::-webkit-scrollbar {
    width: 6px;
}

.todos-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.todos-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#todo-list {
    list-style: none;
}

/* Task Items */
.task-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    animation: slideIn 0.3s ease forwards;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-20px); }
}

.task-item.removing {
    animation: fadeOut 0.3s ease forwards;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    flex: 1;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.task-text {
    font-size: 1.05rem;
    transition: all 0.3s ease;
    word-break: break-word;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Delete Button */
.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.task-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    color: var(--danger);
    transform: scale(1.1);
}

/* Footer Element */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

#task-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#clear-completed {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

#clear-completed:hover {
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state svg {
    opacity: 0.5;
}
