:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-family: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Background Ambient Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: drift 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

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

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#date-display {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Input Section */
.input-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

#task-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

#task-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#add-btn {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    width: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.25rem;
    transition: var(--transition);
}

#add-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

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

/* Task List */
.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: var(--transition);
    animation: slideIn 0.3s ease-out;
}

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

.task-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

.task-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.task-item.completed .custom-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.custom-checkbox i {
    font-size: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition);
}

.task-item.completed .custom-checkbox i {
    opacity: 1;
    transform: scale(1);
}

.task-text {
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    word-break: break-word;
}

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

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    border-radius: 6px;
    transition: var(--transition);
    opacity: 0;
}

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

.delete-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
