:root {
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --accent-color: #818cf8;
    /* Indigo 400 */
    --accent-glow: rgba(129, 140, 248, 0.4);
    --danger: #ef4444;
    --success: #10b981;

    --font-family: 'Outfit', sans-serif;
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Dynamic Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #4f46e5;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: #c026d3;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: #0ea5e9;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Layout */
.dashboard {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    z-index: 1;
}

.header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.greeting-container h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.quote {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

.date-display {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-main);
    background: var(--glass-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}

.glass-card:hover {
    border-color: var(--glass-highlight);
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Timer Section */
.timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mode-toggles {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 12px;
}

.mode-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--glass-highlight);
    color: var(--text-main);
}

.timer-display {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke-dasharray: 691;
    /* 2 * PI * 110 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s linear, stroke 0.3s ease;
}

.time-text {
    position: absolute;
    font-size: 3.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Todo Section */
.task-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#todo-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#todo-input:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.btn-icon {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 52px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #6366f1;
}

.todo-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar */
.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: transparent;
}

.todo-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease forwards;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.todo-item.completed {
    opacity: 0.6;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.todo-checkbox:checked {
    background: var(--success);
    border-color: var(--success);
}

.todo-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.todo-text {
    flex: 1;
    font-size: 1rem;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.todo-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    color: var(--danger);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .greeting-container h1 {
        font-size: 2.5rem;
    }

    .dashboard {
        padding: 1rem;
    }
}