:root {
    --primary: #00d9ff;
    --primary-dark: #00a8cc;
    --bg: #ffffff;
    --card-bg: #f5f5f5;
    --card-bg-hover: #ebebeb;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #666666;
    --danger-bg: #fff0f0;
    --danger-border: #ff4444;
    --danger-text: #cc0000;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --card-bg: #111111;
        --card-bg-hover: #141414;
        --border: #262626;
        --text: #ffffff;
        --text-muted: #737373;
        --danger-bg: #1a0000;
        --danger-border: #ff4444;
        --danger-text: #ff4444;
    }
}

.todo-container {
    color: var(--text);
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.todo-app {
    max-width: 600px;
    width: 100%;
}

.todo-header {
    text-align: center;
    margin-bottom: 3rem;
}

.todo-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.todo-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.todo-input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.todo-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    border-radius: 0;
    font-family: inherit;
}

.todo-input:focus {
    outline: none;
    border-color: var(--primary);
}

.todo-add-btn {
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--bg);
    border: 1px solid var(--primary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.todo-add-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.todo-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.todo-stat {
    display: inline;
}

.todo-stat strong {
    color: var(--primary);
    font-weight: 700;
}

.todo-stat-divider {
    color: var(--border);
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.todo-item:hover {
    border-color: var(--primary);
    background: var(--card-bg-hover);
}

.todo-item-completed {
    opacity: 0.6;
}

.todo-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-item-completed .todo-checkbox {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg);
}

.todo-item span {
    flex: 1;
    color: var(--text);
    font-size: 1rem;
}

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

.todo-clear-btn {
    margin-left: auto;
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-weight: 500;
    cursor: pointer;
    border-radius: 0;
    font-family: inherit;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.todo-clear-btn:hover {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.todo-delete-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0;
}

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

.todo-delete-btn:hover {
    color: var(--danger-text);
    border-color: var(--danger-border);
    background: var(--danger-bg);
}

/* Timer Demo */
.timer-demo {
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    max-width: 600px;
    width: 100%;
}

.timer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.timer-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
}

.timer-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.timer-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.timer-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.timeout-btn:hover {
    border-color: #ffa500;
    color: #ffa500;
}

.interval-btn:hover {
    border-color: #22c55e;
    color: #22c55e;
}

.fetch-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.timer-output {
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.timer-label {
    color: var(--text-muted);
}

.timer-count {
    color: var(--primary);
    font-size: 1.25rem;
}

.timer-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 0;
    font-style: italic;
}

@media (max-width: 768px) {
    .todo-container {
        padding: 2rem 1rem;
    }
    
    .todo-title {
        font-size: 2rem;
    }
    
    .todo-stats {
        flex-wrap: wrap;
    }
    
    .todo-input-section {
        flex-direction: column;
    }
    
    .todo-add-btn {
        width: 100%;
    }

    .todo-delete-btn {
        opacity: 1;
    }

    .timer-buttons {
        flex-direction: column;
    }

    .timer-btn {
        width: 100%;
    }
}
