:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --danger-color: #ef4444;
    --success-color: #10b981;
    --nav-height: 64px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.3s ease;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: blobify 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    top: 40%;
    left: 10%;
    animation-delay: -10s;
}

@keyframes blobify {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Nav Dock */
.nav-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    height: 56px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.nav-left,
.nav-right {
    padding: 0 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
    margin: 0 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--glass-border);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.lang-wrapper select {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

#current-time {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px 140px;
    transition: filter 0.3s ease;
}

.hero-section {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 12px;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Task Input */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.task-input-area {
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.input-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

input[type="text"],
input[type="number"],
textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

#task-name {
    flex: 1;
}

.timer-input-wrapper {
    position: relative;
    width: 100px;
}

#task-duration {
    width: 100%;
    padding-right: 32px;
    font-family: var(--font-mono);
}

.input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-secondary);
    pointer-events: none;
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 24px;
    height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Tasks List */
.tasks-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.badge {
    background: var(--glass-border);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.tasks-list {
    display: grid;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
}

/* Task Item Card */
.task-item {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.task-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.task-checkbox-wrapper {
    cursor: pointer;
}

.task-info {
    flex: 1;
}

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.task-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Task Description in Card */
.task-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 36px;
    border-left: 2px solid var(--glass-border);
    margin-left: 9px;
    white-space: pre-line;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Timer Pill */
.timer-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-color);
    border: 1px solid var(--glass-border);
    min-width: 90px;
    text-align: center;
}

.timer-active {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.timer-active .timer-pill {
    background: var(--accent-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Focus Overlay */
.focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: opacity 0.5s ease;
}

.focus-content {
    max-width: 800px;
    width: 100%;
    animation: zoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.focus-timer {
    font-size: 12rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 60px var(--accent-glow);
    margin: 20px 0;
}

#focus-task-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

#focus-task-desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.exit-focus-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}

.focus-action-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px var(--accent-glow);
    transition: all 0.3s ease;
}

.focus-action-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 6000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.visible {
    transform: translateX(0);
}

.toast-content {
    background: #1a1a1a;
    border: 1px solid var(--accent-color);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

.toast-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Custom Checkbox */
.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-checkbox-wrapper:hover .custom-checkbox {
    border-color: var(--accent-color);
}

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

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

/* Responsive */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }

    .focus-timer {
        font-size: 6rem;
    }

    .nav-dock {
        bottom: 12px;
        width: calc(100% - 24px);
        gap: 8px;
    }
}